add gcc 3.4.4 patch from trunk, libgcc is linked explictly. tested nmap and kismet...
authorWaldemar Brodkorb <mail@waldemar-brodkorb.de>
Fri, 20 Jan 2006 19:18:37 +0000 (19:18 +0000)
committerWaldemar Brodkorb <mail@waldemar-brodkorb.de>
Fri, 20 Jan 2006 19:18:37 +0000 (19:18 +0000)
SVN-Revision: 3031

12 files changed:
openwrt/package/Config.in
openwrt/package/base-files/Config.in [new file with mode: 0644]
openwrt/package/base-files/Makefile
openwrt/package/kismet/Makefile
openwrt/package/kismet/ipkg/kismet-server.control
openwrt/package/nmap/Makefile
openwrt/package/nmap/ipkg/nmap.control
openwrt/target/linux/imagebuilder/lists/default.brcm-2.4
openwrt/target/linux/imagebuilder/lists/micro.brcm-2.4
openwrt/target/linux/imagebuilder/lists/pptp.brcm-2.4
openwrt/toolchain/gcc/3.4.4/static-libgcc.patch.conditional [new file with mode: 0644]
openwrt/toolchain/gcc/Makefile

index 73b031c608b4403fc13bccf8e419e4c5a0207484..681f4390bd3336b575fce31e07376f58229e6c91 100644 (file)
@@ -94,6 +94,7 @@ source "package/glib/Config.in"
 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
diff --git a/openwrt/package/base-files/Config.in b/openwrt/package/base-files/Config.in
new file mode 100644 (file)
index 0000000..6ddbc0d
--- /dev/null
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_LIBGCC
+       tristate "libgcc - GCC support library"
+       default m if CONFIG_DEVEL
+       help
+         GCC support library
+
index 09df0abeea128a2f38254b8304c1de8953612143..f291c4ec9af834dbc8bf42277caf1fff2e5b699a 100644 (file)
@@ -3,7 +3,7 @@
 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
@@ -19,7 +19,16 @@ GCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version}
 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)
@@ -62,7 +71,7 @@ $(IPKG_LIBC):
 $(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)
 
@@ -73,4 +82,4 @@ prepare:
 compile: $(PACKAGES)
 install: compile
        mkdir -p $(TARGET_DIR)
-       $(IPKG) install $(PACKAGES)
+       $(IPKG) install $(PACKAGES_INSTALL)
index dab9e02781b122edea5da96de8a2c5e1eb22821c..49de9e234e0ebe4aa277efabbb0d44291f164909 100644 (file)
@@ -58,7 +58,7 @@ $(PKG_BUILD_DIR)/.configured:
 $(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 $@
 
index 3c416be83c43cda59ab2d134ed23d94c6c5572a0..238f0f19e942674d5c30517c62c68a460a0c9626 100644 (file)
@@ -1,7 +1,7 @@
 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
index 2cded7e62656a6ee2ccc7160cd51b215c532c7de..882180b9713a95d15933d5dcf25874f0a9569874 100644 (file)
@@ -26,7 +26,7 @@ $(PKG_BUILD_DIR)/.configured:
                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) \
index ad2a984d123fee57bf8fc2486acf72addd050c29..56253fda0b4a3630b6623c128e9a34e766842eb5 100644 (file)
@@ -1,5 +1,5 @@
 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.
index 37f52710cb9c82425415f6927ee1331fde554922..ae05a020a2d112530fa800ad0c627d3bec872ab6 100644 (file)
@@ -14,7 +14,6 @@ kmod-ppp
 kmod-pppoe
 kmod-switch
 kmod-wlcompat
-libgcc
 mtd
 nvram
 ppp
index 2d696cf3598183bb2af34cee70bc643372463b98..3abd34ca059fca737d2388a8f1451e8ed3e09fe0 100644 (file)
@@ -11,7 +11,6 @@ kmod-brcm-wl
 kmod-diag
 kmod-switch
 kmod-wlcompat
-libgcc
 mtd
 nvram
 uclibc
index f035268a0fb5f28288913571ae9253ebd4650e7d..6786bde47483b8651245ce15c693f570c0e2dee6 100644 (file)
@@ -14,7 +14,6 @@ kmod-ppp
 kmod-gre
 kmod-switch
 kmod-wlcompat
-libgcc
 mtd
 nvram
 ppp
diff --git a/openwrt/toolchain/gcc/3.4.4/static-libgcc.patch.conditional b/openwrt/toolchain/gcc/3.4.4/static-libgcc.patch.conditional
new file mode 100644 (file)
index 0000000..c8c1d84
--- /dev/null
@@ -0,0 +1,11 @@
+--- 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}
index dc7e02c7ae8b80c94338819466dbbdaac2047c8a..f6f4acaab63cc067a5b68ecb4e04703b507a1a91 100644 (file)
@@ -188,6 +188,16 @@ ifeq ($(findstring 3.3.,$(GCC_VERSION)),3.3.)
        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