source "package/libdb/Config.in"
source "package/libelf/Config.in"
source "package/libevent/Config.in"
+source "package/base-files/Config.in" # libgcc
source "package/libgd/Config.in"
source "package/libgdbm/Config.in"
source "package/gmp/Config.in" # libbgmp
--- /dev/null
+config BR2_PACKAGE_LIBGCC
+ tristate "libgcc - GCC support library"
+ default m if CONFIG_DEVEL
+ help
+ GCC support library
+
include $(TOPDIR)/rules.mk
PKG_NAME:=base-files
-PKG_RELEASE:=6
+PKG_RELEASE:=7
PKG_BUILD_DIR:=$(BUILD_DIR)/base-files
include $(TOPDIR)/package/rules.mk
IDIR_GCC:=$(PKG_BUILD_DIR)/libgcc
IPKG_GCC:=$(PACKAGE_DIR)/libgcc_$(GCC_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
-PACKAGES:=$(IPKG_BASE) $(IPKG_LIBC) $(IPKG_GCC)
+PACKAGES:=$(IPKG_BASE) $(IPKG_LIBC)
+PACKAGES_INSTALL:=$(IPKG_BASE) $(IPKG_LIBC)
+
+ifeq ($(BR2_PACKAGE_LIBGCC),y)
+PACKAGES+=$(IPKG_GCC)
+PACKAGES_INSTALL+=$(IPKG_GCC)
+endif
+ifeq ($(BR2_PACKAGE_LIBGCC),m)
+PACKAGES+=$(IPKG_GCC)
+endif
$(PKG_BUILD_DIR)/.prepared:
mkdir -p $(PKG_BUILD_DIR) $(PACKAGE_DIR)
$(IPKG_GCC):
$(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_GCC) ipkg/libgcc.control $(GCC_VERSION)-$(PKG_RELEASE) $(ARCH)
mkdir -p $(IDIR_GCC)/lib
- cp -fpR $(STAGING_DIR)/lib/libgcc*.so.* $(IDIR_GCC)/lib/
+ cp -fpR $(STAGING_DIR)/lib/libgcc_s.so.* $(IDIR_GCC)/lib/
-$(STRIP) $(IDIR_GCC)/lib/*
$(IPKG_BUILD) $(IDIR_GCC) $(PACKAGE_DIR)
compile: $(PACKAGES)
install: compile
mkdir -p $(TARGET_DIR)
- $(IPKG) install $(PACKAGES)
+ $(IPKG) install $(PACKAGES_INSTALL)
$(PKG_BUILD_DIR)/.built:
$(MAKE) -C $(PKG_BUILD_DIR) \
CC=$(TARGET_CC) \
- LIBS="-L$(STAGING_DIR)/lib -fno-builtin -nostdinc++ -nodefaultlibs -luClibc++ -lc -lm" \
+ LIBS="-L$(STAGING_DIR)/lib -fno-builtin -nostdinc++ -nodefaultlibs -luClibc++ -lc -lm -lgcc" \
CPPFLAGS="-I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include -I$(LINUX_DIR)/include"
touch $@
Package: kismet-server
Priority: optional
Section: net
-Depends: uclibc++, libpcap
+Depends: libgcc, uclibc++, libpcap
Description: The kismet server
Kismet is an 802.11 layer2 wireless network detector,
sniffer, and intrusion detection system. Kismet will work with any
CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -nostdinc++" \
CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
- LIBS="-nodefaultlibs -luClibc++ -lc -lm" \
+ LIBS="-nodefaultlibs -luClibc++ -lc -lm -lgcc" \
ac_cv_prog_CXX="$(TARGET_CXX)" \
./configure \
--target=$(GNU_TARGET_NAME) \
Package: nmap
Priority: optional
Section: net
-Depends: libpcap, libpcre, uclibc++
+Depends: libgcc, libpcap, libpcre, uclibc++
Description: Nmap is a free open source utility for network exploration or security auditing.
kmod-pppoe
kmod-switch
kmod-wlcompat
-libgcc
mtd
nvram
ppp
kmod-diag
kmod-switch
kmod-wlcompat
-libgcc
mtd
nvram
uclibc
kmod-gre
kmod-switch
kmod-wlcompat
-libgcc
mtd
nvram
ppp
--- /dev/null
+--- specs~ 2005-11-21 17:22:08.000000000 +0100
++++ specs 2005-11-21 17:22:08.000000000 +0100
+@@ -51,7 +51,7 @@
+ %{shared: -lc} %{!static:-rpath-link %R/lib:%R/usr/lib} %{!shared: %{pthread:-lpthread} %{profile:-lc_p} %{!profile: -lc}}
+
+ *libgcc:
+-%{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared-libgcc:-lgcc --as-needed -lgcc_s%M --no-as-needed}%{shared-libgcc:-lgcc_s%M%{!shared: -lgcc}}}}
++%{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared:%{!shared-libgcc:-lgcc -lgcc_eh}%{shared-libgcc:-lgcc_s%M -lgcc}}%{shared:%{shared-libgcc:-lgcc_s%M}%{!shared-libgcc:-lgcc}}}}
+
+ *startfile:
+ %{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}
cp ./$(GCC_VERSION)/specs-$(ARCH)-soft-float $(STAGING_DIR)/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs
endif
endif
+# We do another ugly hack here because the standard behaviour is
+# to include a reference to libgcc.so.1 in all binaries. For flash space
+# saving, we change the specs file to link in a static libgcc here.
+ if [ ! -f $(STAGING_DIR)/lib/gcc/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs ] ; then \
+ echo staging dir specs file is missing ; \
+ /bin/false ; \
+ fi;
+ if grep -q as-needed $(STAGING_DIR)/lib/gcc/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs; then \
+ patch -d $(STAGING_DIR)/lib/gcc/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/ -p0 < ./$(GCC_VERSION)/static-libgcc.patch.conditional ; \
+ fi;
source: $(DL_DIR)/$(GCC_SOURCE)
prepare: $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc