Remove usage of TARGET_LDFLAGS all together. Both TARGET_CFLAGS and TARGET_LDFLAGS...
author"Steven J. Hill" <sjhill@realitydiluted.com>
Fri, 6 Jul 2007 04:26:32 +0000 (04:26 -0000)
committer"Steven J. Hill" <sjhill@realitydiluted.com>
Fri, 6 Jul 2007 04:26:32 +0000 (04:26 -0000)
15 files changed:
package/Makefile.in
package/dbus-glib/dbus-glib.mk
package/directfb/directfb.mk
package/dmalloc/dmalloc.mk
package/file/file.mk
package/lockfile-progs/lockfile-progs.mk
package/mtd/mtd.mk
package/procps/procps-remove-flags.patch [new file with mode: 0644]
package/procps/procps.mk
package/qte/qte.mk
package/qtopia4/qtopia4.mk
package/sudo/sudo.mk
package/xfsprogs/xfsprogs.mk
package/zlib/zlib.mk
toolchain/uClibc/uclibc.mk

index 470c45d1925043f68364150c35d412011718cf73..3cbf6321d580edc196dbc745d4d3a31ae13a7596 100644 (file)
@@ -123,17 +123,15 @@ GNU_HOST_NAME:=$(HOST_ARCH)-$(subst ",,$(BR2_GNU_BUILD_SUFFIX))
 TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \
                AR=$(TARGET_CROSS)ar \
                AS=$(TARGET_CROSS)as \
-               LD=$(TARGET_CROSS)ld \
+               LD="$(TARGET_CROSS)ld $(TARGET_LDFLAGS)" \
                NM=$(TARGET_CROSS)nm \
-               CC=$(TARGET_CROSS)gcc \
-               GCC=$(TARGET_CROSS)gcc \
-               CXX=$(TARGET_CROSS)g++ \
-               CPP=$(TARGET_CROSS)cpp \
+               CC="$(TARGET_CROSS)gcc $(TARGET_CFLAGS)" \
+               GCC="$(TARGET_CROSS)gcc $(TARGET_CFLAGS)" \
+               CXX="$(TARGET_CROSS)g++ $(TARGET_CFLAGS)" \
+               CPP="$(TARGET_CROSS)cpp $(TARGET_CFLAGS)" \
                RANLIB=$(TARGET_CROSS)ranlib \
                STRIP=$(TARGET_CROSS)strip \
                OBJCOPY=$(TARGET_CROSS)objcopy \
-               CFLAGS="$(TARGET_CFLAGS)" \
-               LDFLAGS="$(TARGET_LDFLAGS)" \
                AR_FOR_BUILD="$(HOSTAR)" \
                AS_FOR_BUILD="$(HOSTAS)" \
                CC_FOR_BUILD="$(HOSTCC)" \
index 042bd87f282ed32202e88818a6077ee2d01da1ff..3a45846ecd2e18e2150ec1d6b751268cbc5a00ff 100644 (file)
@@ -28,8 +28,6 @@ $(DBUS_GLIB_DIR)/.configured: $(DBUS_GLIB_DIR)/.unpacked /usr/bin/pkg-config
                ac_cv_have_abstract_sockets=yes \
                ac_cv_func_posix_getpwnam_r=yes \
                have_abstract_sockets=yes \
-               CFLAGS="$(TARGET_CFLAGS)" \
-               LDFLAGS="$(TARGET_LDFLAGS)" \
                DBUS_CFLAGS="-I$(STAGING_DIR)/usr/include/dbus-1.0 -I$(STAGING_DIR)/usr/lib/dbus-1.0/include" \
                DBUS_LIBS="$(STAGING_DIR)/usr/lib/libdbus-1.so" \
                DBUS_GLIB_CFLAGS="-I$(STAGING_DIR)/include/glib-2.0 -I$(STAGING_DIR)/lib/glib-2.0/include" \
index bbef8355984b9bc61ac2609ca7b7c582e0290be2..26c55122b9bba72860f9655e2802aff7ef4034a0 100644 (file)
@@ -23,8 +23,6 @@ $(DIRECTFB_DIR)/.configured: $(DIRECTFB_DIR)/.unpacked
        (cd $(DIRECTFB_DIR); \
                $(TARGET_CONFIGURE_OPTS) \
                $(TARGET_CONFIGURE_ARGS) \
-       CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
-       LDFLAGS="$(TARGET_LDFLAGS)" \
        ac_cv_header_linux_wm97xx_h=no \
        ac_cv_header_linux_sisfb_h=no \
        ac_cv_header_asm_page_h=no \
index f044f85c3a6e5182091ed97961fe6291320e1357..0b425f1d529f12c034bd301a5cab24727063925d 100644 (file)
@@ -3,7 +3,7 @@
 # dmalloc
 #
 #############################################################
-DMALLOC_VER:=5.4.2
+DMALLOC_VER:=5.4.3
 DMALLOC_SOURCE:=dmalloc-$(DMALLOC_VER).tgz
 DMALLOC_SITE:=http://dmalloc.com/releases
 DMALLOC_DIR:=$(BUILD_DIR)/dmalloc-$(DMALLOC_VER)
@@ -43,8 +43,8 @@ $(DMALLOC_DIR)/.configured: $(DMALLOC_DIR)/.unpacked
        (cd $(DMALLOC_DIR); rm -rf config.cache; \
                $(TARGET_CONFIGURE_OPTS) \
                $(TARGET_CONFIGURE_ARGS) \
-               CFLAGS="-g $(TARGET_CFLAGS)" \
-               LDFLAGS="-g $(TARGET_LDFLAGS)" \
+               CFLAGS="-g" \
+               LDFLAGS="-g" \
                ./configure \
                --target=$(GNU_TARGET_NAME) \
                --host=$(GNU_TARGET_NAME) \
index c23c038e2b9d07f736c4fde203f02f433f31a900..a12d3af439cedef7dca85d67bacad1fec20ef119 100644 (file)
@@ -85,10 +85,10 @@ $(FILE_DIR2)/.configured: $(FILE_SOURCE_DIR)/.unpacked
        touch $(FILE_DIR2)/.configured
 
 $(FILE_DIR2)/$(FILE_BINARY): $(FILE_DIR2)/.configured $(TOOL_BUILD_DIR)/bin/file
-       $(MAKE) $(TARGET_CONFIGURE_OPTS) LDFLAGS="$(TARGET_LDFLAGS) -static" -C $(FILE_DIR2)
+       $(MAKE) $(TARGET_CONFIGURE_OPTS) LDFLAGS="-static" -C $(FILE_DIR2)
 
 $(TARGET_DIR)/$(FILE_TARGET_BINARY): $(FILE_DIR2)/$(FILE_BINARY)
-       $(MAKE) $(TARGET_CONFIGURE_OPTS) LDFLAGS="$(TARGET_LDFLAGS)" DESTDIR=$(TARGET_DIR) -C $(FILE_DIR2) install
+       $(MAKE) $(TARGET_CONFIGURE_OPTS) DESTDIR=$(TARGET_DIR) -C $(FILE_DIR2) install
        -($(STRIP) $(TARGET_DIR)/usr/lib/libmagic.so.*.* > /dev/null 2>&1)
        rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
                $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
index c20e48bc3a2f611a808f1afc0a5efcdf08327708..2fdaa4b8d9d404a60fbf46323310495f9d56656e 100644 (file)
@@ -20,8 +20,7 @@ $(LOCKFILE_PROGS_DIR)/.unpacked: $(DL_DIR)/$(LOCKFILE_PROGS_SOURCE)
        touch $(LOCKFILE_PROGS_DIR)/.unpacked
 
 $(TARGET_DIR)/$(LOCKFILE_PROGS_BINARY): $(LOCKFILE_PROGS_DIR)/.unpacked
-       $(MAKE) CC="$(TARGET_CC) $(TARGET_CFLAGS)"                      \
-               LDFLAGS="$(TARGET_LDFLAGS)" -C $(LOCKFILE_PROGS_DIR)
+       $(MAKE) CC="$(TARGET_CC) $(TARGET_CFLAGS)" -C $(LOCKFILE_PROGS_DIR)
        cp -a $(LOCKFILE_PROGS_DIR)/bin/lockfile* $(TARGET_DIR)/usr/bin
        $(STRIP) --strip-unneeded $(TARGET_DIR)/$(LOCKFILE_PROGS_BINARY)
 
index d57922d6423b7f481e5ca51a18b5773be5e4b725..0d7572afd57da37fc90e07f5198013abd362b457 100644 (file)
@@ -115,7 +115,7 @@ MTD_TARGETS_$(BR2_PACKAGE_MTD_DOC_LOADBIOS)         += doc_loadbios
 MTD_BUILD_TARGETS := $(addprefix $(MTD_DIR)/util/, $(MTD_TARGETS_y))
 
 $(MTD_BUILD_TARGETS): $(MTD_DIR)/.unpacked
-       $(MAKE) CC=$(TARGET_CC) CFLAGS="-I$(MTD_DIR)/include -I$(LINUX_HEADERS_DIR)/include $(TARGET_CFLAGS)" LDFLAGS="$(TARGET_LDFLAGS)" LINUXDIR=$(LINUX_DIR) -C $(MTD_DIR)/util
+       $(TARGET_CONFIGURE_OPTS) $(MAKE)        CFLAGS="-I$(MTD_DIR)/include -I$(LINUX_HEADERS_DIR)/include" LINUXDIR=$(LINUX_DIR) -C $(MTD_DIR)/util
 
 MTD_TARGETS := $(addprefix $(TARGET_DIR)/usr/sbin/, $(MTD_TARGETS_y))
 
diff --git a/package/procps/procps-remove-flags.patch b/package/procps/procps-remove-flags.patch
new file mode 100644 (file)
index 0000000..cb4dc56
--- /dev/null
@@ -0,0 +1,26 @@
+diff -u procps-3.2.5/Makefile procps-3.2.5-patched/Makefile
+--- procps-3.2.5/Makefile      2005-01-25 22:55:26.000000000 -0600
++++ procps-3.2.5-patched/Makefile      2007-07-05 23:09:24.251423681 -0500
+@@ -70,9 +70,7 @@
+ CURSES := -lncurses
+ # Preprocessor flags.
+-PKG_CPPFLAGS := -D_GNU_SOURCE -I proc
+-CPPFLAGS     := -I/usr/include/ncurses
+-ALL_CPPFLAGS := $(PKG_CPPFLAGS) $(CPPFLAGS)
++ALL_CPPFLAGS := -D_GNU_SOURCE -I proc
+ # Left out -Wconversion due to noise in glibc headers.
+ # Left out -Wunreachable-code and -Wdisabled-optimization
+@@ -91,11 +89,9 @@
+   -Wstrict-prototypes -Wmissing-prototypes
+ # Note that some stuff below is conditional on CFLAGS containing
+ # an option that starts with "-g". (-g, -g2, -g3, -ggdb, etc.)
+-CFLAGS       := -O2 -s
+ ALL_CFLAGS   := $(PKG_CFLAGS) $(CFLAGS)
+ PKG_LDFLAGS  := -Wl,-warn-common
+-LDFLAGS      :=
+ ALL_LDFLAGS  := $(PKG_LDFLAGS) $(LDFLAGS)
+ ############ Add some extra flags if gcc allows
index ff0aac6e56d0e4132ca35452e61267b502a9ad1f..3cab79d82778cf1d8fc779229cce33ec54bb3fcb 100644 (file)
@@ -16,13 +16,10 @@ $(DL_DIR)/$(PROCPS_SOURCE):
 $(PROCPS_DIR)/.source: $(DL_DIR)/$(PROCPS_SOURCE)
        $(ZCAT) $(DL_DIR)/$(PROCPS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
        toolchain/patch-kernel.sh $(PROCPS_DIR) package/procps/ procps\*.patch
-       $(SED) '/^CFLAGS/s:-O2:$(TARGET_CFLAGS):' $(PROCPS_DIR)/Makefile
-       $(SED) '/^LDFLAGS/s:$$:$(TARGET_LDFLAGS):' $(PROCPS_DIR)/Makefile
        touch $(PROCPS_DIR)/.source
 
 $(PROCPS_DIR)/$(PROCPS_BINARY): $(PROCPS_DIR)/.source
-       $(TARGET_CONFIGURE_OPTS) $(MAKE) CPPFLAGS=-I$(STAGING_DIR)/include \
-               CC=$(TARGET_CC) -C $(PROCPS_DIR)
+       $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(PROCPS_DIR)
 
 $(TARGET_DIR)/$(PROCPS_TARGET_BINARY): $(PROCPS_DIR)/$(PROCPS_BINARY)
        $(TARGET_CONFIGURE_OPTS) $(MAKE) DESTDIR=$(TARGET_DIR) \
index 38dee5be71e0c2ac74cbdc81f642810c672ded91..571c3264a7d45ee41918965dbbceb7c50e6feda4 100644 (file)
@@ -157,8 +157,6 @@ endif
 $(QTE_QVFB_DIR)/.configured: $(QTE_QVFB_DIR)/.unpacked $(QTE_TMAKE_DIR)/.unpacked
        (cd $(@D); export QTDIR=`pwd`; export TMAKEPATH=$(QTE_TMAKE_DIR)/lib/linux-g++; export $$QTDIR/bin:$$PATH; export LD_LIBRARY_PATH=$$QTDIR/lib:$$LD_LIBRARY_PATH; echo 'yes' | \
                $(TARGET_CONFIGURE_OPTS) \
-               CFLAGS="$(TARGET_CFLAGS)" \
-               LDFLAGS="$(TARGET_LDFLAGS)" \
                ./configure \
                $(QTE_QVFB_CONFIGURE) \
        );
@@ -173,8 +171,6 @@ $(QTE_QVFB_DIR)/.configured: $(QTE_QVFB_DIR)/.unpacked $(QTE_TMAKE_DIR)/.unpacke
 $(QTE_QTOPIA_DIR)/.configured: $(QTE_QTOPIA_DIR)/.unpacked $(QTE_TMAKE_DIR)/.unpacked $(QTE_QTE_DIR)/$(QTE_UIC_BINARY) $(QTE_QTE_DIR)/$(QTE_QVFB_BINARY) $(QTE_QT3_DIR)/.configured
        (cd $(@D); export QTDIR=$(QTE_QTE_DIR); export QPEDIR=$(QTE_QTOPIA_DIR); export PATH=$(STAGING_DIR)/bin:$$QTDIR/bin:$$PATH; QT3DIR=$(QTE_QTE_DIR); echo 'yes' | \
                $(TARGET_CONFIGURE_OPTS) \
-               CFLAGS="$(TARGET_CFLAGS)" \
-               LDFLAGS="$(TARGET_LDFLAGS)" \
                ./configure \
                $(QTE_QTOPIA_CONFIGURE) --edition phone -no-qtopiadesktop -dqt $(QTE_QT3_DIR) -arch generic -displaysize 160-240 -languages en_US \
                -platform linux-g++ -qvfb -xplatform $(BR2_QTE_CROSS_PLATFORM) \
index 45ed5c8f2256dac418e8aa929b99d416f9b9204f..e1cded34f4d06ae1220edebd35f5d6b74a2e8b56 100644 (file)
@@ -123,7 +123,6 @@ endif
        (cd $(QTOPIA4_TARGET_DIR); rm -rf config.cache; \
                PATH=$(TARGET_PATH) \
                CFLAGS="$(TARGET_CFLAGS)" \
-               LDFLAGS="$(TARGET_LDFLAGS)" \
                CXXFLAGS="$(TARGET_CXXFLAGS)" \
                QPEHOME=/usr \
                QPEDIR=/usr \
index a14b6d4bf2dc9bac34aafdd4b89d867281124970..02db27580bcf21e9f550381c538f77010f536812 100644 (file)
@@ -25,8 +25,6 @@ $(SUDO_DIR)/.configured: $(SUDO_DIR)/.unpacked $(SUDO_CONFIG_FILE)
                $(TARGET_CONFIGURE_OPTS) \
                $(TARGET_CONFIGURE_ARGS) \
                ./configure \
-               CFLAGS="$(TARGET_CFLAGS)" \
-               LDFLAGS="$(TARGET_LDFLAGS)" \
                --target=$(GNU_TARGET_NAME) \
                --host=$(GNU_TARGET_NAME) \
                --build=$(GNU_HOST_NAME) \
index 1e7481490aedf060b5743bd35aa89ff23f8be813..b7bbf34ecf4124f1a86ccd4ee8c1f6eb4880c0d6 100644 (file)
@@ -35,8 +35,8 @@ $(XFSPROGS_DIR)/.configured: $(XFSPROGS_DIR)/.unpacked
        (cd $(XFSPROGS_DIR); rm -rf config.cache; \
                $(TARGET_CONFIGURE_OPTS) \
                $(TARGET_CONFIGURE_ARGS) \
-               CPPFLAGS=-I$(E2FSPROGS_DIR)/lib \
-               LDFLAGS="$(TARGET_LDFLAGS) -L$(E2FSPROGS_DIR)/lib" \
+               CPPFLAGS="-I$(E2FSPROGS_DIR)/lib" \
+               LDFLAGS="-L$(E2FSPROGS_DIR)/lib" \
                LIBTOOL=$(LIBTOOL_DIR)/libtool \
                INSTALL_USER=$(shell whoami) \
                INSTALL_GROUP=$(shell groups | cut -d" " -f1) \
@@ -52,8 +52,8 @@ $(XFSPROGS_DIR)/.configured: $(XFSPROGS_DIR)/.unpacked
        touch $(XFSPROGS_DIR)/.configured
 
 $(XFSPROGS_DIR)/$(XFSPROGS_BINARY): $(XFSPROGS_DIR)/.configured
-       $(MAKE1) PATH=$(TARGET_PATH) CPPFLAGS=-I$(E2FSPROGS_DIR)/lib \
-               LDFLAGS="$(TARGET_LDFLAGS) -L$(E2FSPROGS_DIR)/lib" -C $(XFSPROGS_DIR)
+       $(MAKE1) PATH=$(TARGET_PATH) CPPFLAGS="-I$(E2FSPROGS_DIR)/lib" \
+               LDFLAGS="-L$(E2FSPROGS_DIR)/lib" -C $(XFSPROGS_DIR)
 ifeq ($(XFSPROGS_CONFIG_SHARED),--enable-shared)
        ( \
                cd $(XFSPROGS_DIR) ; \
index 4414b68c76ad2a6a0710936741a0ed03e20ded6c..8456274ea97ce6140c83e7cf4a3fc5015da8b111 100644 (file)
@@ -8,7 +8,7 @@ ZLIB_SOURCE:=zlib-$(ZLIB_VER).tar.bz2
 ZLIB_CAT:=$(BZCAT)
 ZLIB_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/libpng
 ZLIB_DIR:=$(BUILD_DIR)/zlib-$(ZLIB_VER)
-ZLIB_CFLAGS:=$(TARGET_CFLAGS) -fPIC
+ZLIB_CFLAGS:=-fPIC
 ifeq ($(BR2_LARGEFILE),y)
 ZLIB_CFLAGS+=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
 endif
@@ -25,8 +25,7 @@ $(ZLIB_DIR)/.patched: $(DL_DIR)/$(ZLIB_SOURCE)
 $(ZLIB_DIR)/.configured: $(ZLIB_DIR)/.patched
        (cd $(ZLIB_DIR); rm -rf config.cache ; \
                $(TARGET_CONFIGURE_OPTS) \
-               CFLAGS="$(TARGET_CFLAGS) $(ZLIB_CFLAGS)" \
-               LDFLAGS="$(TARGET_LDFLAGS)" \
+               CFLAGS="$(ZLIB_CFLAGS)" \
                ./configure \
                --shared \
                --prefix=/usr \
index c8c23fc7bd0f7673e567ab33a1377a2190b68915..19af67afbbfeecfa983b456cb22cc3a963b88ba5 100644 (file)
@@ -113,8 +113,6 @@ $(UCLIBC_DIR)/.config: $(UCLIBC_DIR)/.unpacked $(UCLIBC_CONFIG_FILE)
                -e 's,^DEVEL_PREFIX=.*,DEVEL_PREFIX=\"/usr/\",g' \
                -e 's,^SHARED_LIB_LOADER_PREFIX=.*,SHARED_LIB_LOADER_PREFIX=\"/lib\",g' \
                $(UCLIBC_DIR)/.config
-       $(SED) 's,^ARCH_CFLAGS=",ARCH_CFLAGS="$(TARGET_CFLAGS) ,g' \
-               $(UCLIBC_DIR)/.config
 ifeq ($(UCLIBC_TARGET_ARCH),arm)
        $(SED) 's/^\(CONFIG_[^_]*[_]*ARM[^=]*\)=.*/# \1 is not set/g' \
                 $(UCLIBC_DIR)/.config