1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-27 18:35:55 +02:00

patch for spec file of gcc 3.4.4, so that libgss library is not

automatically linked into every binary. explicitely link it into needed
packages (kismet, nmap, samba) and add dependencies. 
idea and patch from sven-ola, thx. Saves 16 kb in the default squashfs
images.



git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@2817 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
wbx 2006-01-04 08:37:19 +00:00
parent 25bfff5314
commit 93a1cc78a5
10 changed files with 29 additions and 10 deletions

View File

@ -183,6 +183,7 @@ source "package/libevent/Config.in"
source "package/expat/Config.in" # libexpat source "package/expat/Config.in" # libexpat
source "package/flac/Config.in" # libflac source "package/flac/Config.in" # libflac
source "package/freetype/Config.in" # libfreetype source "package/freetype/Config.in" # libfreetype
source "package/base-files/Config.in" # libgcc
source "package/libgcrypt/Config.in" source "package/libgcrypt/Config.in"
source "package/libgd/Config.in" source "package/libgd/Config.in"
source "package/libgdbm/Config.in" source "package/libgdbm/Config.in"

View File

@ -29,7 +29,15 @@ LIBGCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version}
IDIR_LIBGCC:=$(PKG_BUILD_DIR)/libgcc IDIR_LIBGCC:=$(PKG_BUILD_DIR)/libgcc
IPKG_LIBGCC:=$(PACKAGE_DIR)/libgcc_$(LIBGCC_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk IPKG_LIBGCC:=$(PACKAGE_DIR)/libgcc_$(LIBGCC_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
PACKAGES:=$(IPKG_BASE) $(IPKG_UCLIBC) $(IPKG_LIBGCC) PACKAGES:=$(IPKG_BASE) $(IPKG_UCLIBC)
PACKAGES_INSTALL:=$(IPKG_BASE) $(IPKG_UCLIBC)
ifeq ($(BR2_PACKAGE_LIBGCC),y)
PACKAGES_INSTALL+=$(IPKG_LIBGCC)
endif
ifeq ($(BR2_PACKAGE_LIBGCC),m)
PACKAGES+=$(IPKG_LIBGCC)
endif
$(PKG_BUILD_DIR)/.prepared: $(PKG_BUILD_DIR)/.prepared:
mkdir -p $(PKG_BUILD_DIR) $(PACKAGE_DIR) mkdir -p $(PKG_BUILD_DIR) $(PACKAGE_DIR)
@ -88,4 +96,4 @@ prepare:
compile-targets: $(PACKAGES) compile-targets: $(PACKAGES)
install-targets: compile install-targets: compile
mkdir -p $(TARGET_DIR) mkdir -p $(TARGET_DIR)
$(IPKG) install $(PACKAGES) $(IPKG) install $(PACKAGES_INSTALL)

View File

@ -1,5 +1,5 @@
Package: uclibc Package: uclibc
Priority: optional Priority: optional
Section: net Section: net
Depends: base-files, libgcc Depends: base-files
Description: Standard C library for embedded Linux systems Description: Standard C library for embedded Linux systems

View File

@ -28,7 +28,7 @@ $(PKG_BUILD_DIR)/.configured:
CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti -nostdinc++" \ CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti -nostdinc++" \
CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(LINUX_DIR)/include" \ CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(LINUX_DIR)/include" \
LDFLAGS="-nodefaultlibs -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ LDFLAGS="-nodefaultlibs -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
LIBS="-luClibc++ -lc -lm" \ LIBS="-luClibc++ -lc -lm -lgcc" \
./configure \ ./configure \
--target=$(GNU_TARGET_NAME) \ --target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \ --host=$(GNU_TARGET_NAME) \
@ -58,7 +58,7 @@ $(PKG_BUILD_DIR)/.configured:
$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.built:
$(MAKE) -C $(PKG_BUILD_DIR) \ $(MAKE) -C $(PKG_BUILD_DIR) \
LIBS="-luClibc++ -lc -lm" \ LIBS="-luClibc++ -lc -lm -lgcc" \
all all
touch $@ touch $@

View File

@ -1,7 +1,7 @@
Package: kismet Package: kismet
Priority: optional Priority: optional
Section: net Section: net
Depends: kismet-client, kismet-server Depends: libgcc, kismet-client, kismet-server
Description: kismet Description: kismet
Kismet is an 802.11 layer2 wireless network detector, Kismet is an 802.11 layer2 wireless network detector,
sniffer, and intrusion detection system. Kismet will work with any sniffer, and intrusion detection system. Kismet will work with any

View File

@ -26,7 +26,7 @@ $(PKG_BUILD_DIR)/.configured:
CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti -nostdinc++" \ CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti -nostdinc++" \
CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
LDFLAGS="-nodefaultlibs -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ LDFLAGS="-nodefaultlibs -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
LIBS="-luClibc++ -lc -lm" \ LIBS="-luClibc++ -lc -lm -lgcc" \
ac_cv_prog_CXX="$(TARGET_CXX)" \ ac_cv_prog_CXX="$(TARGET_CXX)" \
./configure \ ./configure \
--target=$(GNU_TARGET_NAME) \ --target=$(GNU_TARGET_NAME) \

View File

@ -1,5 +1,5 @@
Package: nmap Package: nmap
Priority: optional Priority: optional
Section: net 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. Description: Nmap is a free open source utility for network exploration or security auditing.

View File

@ -58,7 +58,7 @@ $(PKG_BUILD_DIR)/.built:
$(TARGET_CONFIGURE_OPTS) \ $(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE -DNDEBUG -DSHMEM_SIZE=524288 -Dfcntl=fcntl64" \ CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE -DNDEBUG -DSHMEM_SIZE=524288 -Dfcntl=fcntl64" \
CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ LDFLAGS="-lgcc_s -L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
ac_cv_lib_cups_httpConnect=no \ ac_cv_lib_cups_httpConnect=no \
ac_cv_sizeof_int=4 \ ac_cv_sizeof_int=4 \
ac_cv_sizeof_long=4 \ ac_cv_sizeof_long=4 \

View File

@ -1,5 +1,5 @@
Package: samba Package: samba
Priority: optional Priority: optional
Section: net Section: net
Depends: Depends: libgcc
Description: NetBIOS/SMB file and print server Description: NetBIOS/SMB file and print server

View 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 cp ./$(GCC_VERSION)/specs-$(ARCH)-soft-float $(STAGING_DIR)/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs
endif endif
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) source: $(DL_DIR)/$(GCC_SOURCE)
prepare: $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc prepare: $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc