svn commit: trunk/buildroot/package
Author: tpetazzoni
Date: 2008-11-11 10:32:31 -0800 (Tue, 11 Nov 2008) New Revision: 24000
Log:
Fix external toolchain build
This patch is a new version of a patch already sent several times on the mailing-list, committed and reverted a few times by Daniel Laird, due to several imperfections. This version is a new try at finding a solution that works for everybody. Hopefully it'll work :-)
The original problem is that external toolchain builds failed because packages couldn't find their dependent libraries at configure time and could not be linked with them. To fix these two problems, two things are added:
* The TARGET_LDFLAGS variable was exposed as LDFLAGS at ./configure time thanks to TARGET_CONFIGURE_OPTS. The TARGET_LDFLAGS variable contains -L options with the path in the STAGING_DIR for the libraries. It allows ./configure scripts to properly compile the small test programs testing whether a dependency is properly installed.
* The TARGET_CFLAGS contains a new -Wl,--rpath-link option for both $(STAGING_DIR)/lib and $(STAGING_DIR)/usr/lib. It allows library depending on other libraries to link properly. The TARGET_CFLAGS is exposed as CFLAGS in TARGET_CONFIGURE_OPTS.
This new version fixes a problem encountered by hartleys <[email protected]> when building the kernel. The problem was that the -Wl,--rpath-link options were added to LDFLAGS, while there are options for the C compiler, not the ld linker. Moving them to CFLAGS seems to fix the issue.
Modified:
trunk/buildroot/package/Makefile.in
Changeset:
Modified: trunk/buildroot/package/Makefile.in
===================================================================
buildroot/package/Makefile.in +10 -4
@@ -38,7 +38,8 @@ ######################################################################### ifeq ($(BR2_TOOLCHAIN_SOURCE),y) TARGET_CFLAGS=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) \ - -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include + -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include \ + -Wl,--rpath-link -Wl,$(STAGING_DIR)/lib -Wl,--rpath-link -Wl,$(STAGING_DIR)/usr/lib TARGET_LDFLAGS+=-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib ifeq ($(BR2_TOOLCHAIN_SYSROOT),y) TARGET_CFLAGS+= $(BR2_SYSROOT) $(BR2_ISYSROOT)
@@ -89,7 +90,9 @@ # else it's an external toolchain ######################################################################### else -TARGET_CFLAGS=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include -I$(TOOLCHAIN_EXTERNAL_PATH)/$(TOOLCHAIN_EXTERNAL_PREFIX)/include +TARGET_CFLAGS=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) \ + -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include -I$(TOOLCHAIN_EXTERNAL_PATH)/$(TOOLCHAIN_EXTERNAL_PREFIX)/include \ + -Wl,--rpath-link -Wl,$(STAGING_DIR)/lib -Wl,--rpath-link -Wl,$(STAGING_DIR)/usr/lib TARGET_CXXFLAGS=$(TARGET_CFLAGS) TARGET_LDFLAGS=-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib endif
@@ -126,7 +129,8 @@ #")) #TOOL_BUILD_DIR=$(BASE_DIR)/$(TOPDIR_PREFIX)toolchain_build_$(TOOLCHAIN_EXTERNAL_PREFIX) TOOL_BUILD_DIR=$(BASE_DIR)/$(TOPDIR_PREFIX)toolchain_build_$(ARCH)$(COND_ARCH_FPU_SUFFIX)$(TOPDIR_SUFFIX) -TARGET_PATH="$(STAGING_DIR)/bin:$(TOOL_BUILD_DIR)/bin:$(TOOLCHAIN_EXTERNAL_PATH)/bin:$(PATH)" +# Make sure that STAGING_DIR/usr/bin is in path for freetype-config etc. +TARGET_PATH="$(STAGING_DIR)/usr/bin:$(STAGING_DIR)/bin:$(TOOL_BUILD_DIR)/bin:$(TOOLCHAIN_EXTERNAL_PATH)/bin:$(PATH)" #IMAGE:=$(BINARIES_DIR)/$(BR2_ROOTFS_PREFIX).$(TOOLCHAIN_EXTERNAL_PREFIX)$(ROOTFS_SUFFIX) IMAGE:=$(BINARIES_DIR)/$(BR2_ROOTFS_PREFIX).$(ARCH)$(COND_ARCH_FPU_SUFFIX)$(ROOTFS_SUFFIX)
@@ -196,7 +200,9 @@ TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \ AR="$(TARGET_AR)" \ AS="$(TARGET_AS)" \ - LD="$(TARGET_LD) $(TARGET_LDFLAGS)" \ + LD="$(TARGET_LD)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ NM="$(TARGET_NM)" \ CC="$(TARGET_CC) $(TARGET_CFLAGS)" \ GCC="$(TARGET_CC) $(TARGET_CFLAGS)" \
Fantastic,
I have just completed local testing of AUTO_CONFIGURE_TARGET that the GIT based buildroot is using.
This uses a central cache for configure and thus speeds configure.
I will update to latest baseline and post back in SVN
In short I have
1. Added top level config option for use of configure cache file
2. Allowed Makefile.autotools.in packages to turn it off individually
3. Not changed how old style packages build but added a variable that can be used if wanted.
After I get this back (tomorrow) I suspect that some Makefile.autotools.in packages might not build
I will post some common things to try to fix these I just cant build all packages before feeding this back.
The improvements are good (speed increase) and configurable so people can always turn off at top level and notice no changes,
It has highlighted an issue with the sheer number of config options that are being hardcoded for packages like GTK etc!
Do we really need this huge number of configure options? surely configure is not that bad at sniffing values?
The problem is that setting these values by hand means they override settings in the cache file which means for example GTK disables CXX compiler, yet I have a perfectly working compiler.
WebKit then tries to build after GTK and says I have no CXX compiler. Deleting this hardcoded config flag means the cache file works.
My next thing is I want Makefile.autotools.in to set pass --enable-static based on BR2_PREFER_STATIC instead of doing it per package. Again I will allow it to be overridden by individual packages.
Cheers
Dan
--------------------------------------------------
From: <[email protected]>
Sent: Tuesday, November 11, 2008 6:32 PM
To: <[email protected]>
Subject: [Buildroot] svn commit: trunk/buildroot/package
Quoted 101 lines
Author: tpetazzoni
Date: 2008-11-11 10:32:31 -0800 (Tue, 11 Nov 2008) New Revision: 24000Log:
Fix external toolchain buildThis patch is a new version of a patch already sent several times on the mailing-list, committed and reverted a few times by Daniel Laird, due to several imperfections. This version is a new try at finding a solution that works for everybody. Hopefully it'll work :-)
The original problem is that external toolchain builds failed because packages couldn't find their dependent libraries at configure time and could not be linked with them. To fix these two problems, two things are added:
* The
TARGET_LDFLAGSvariable was exposed as LDFLAGS at ./configure time thanks toTARGET_CONFIGURE_OPTS. TheTARGET_LDFLAGSvariable contains -L options with the path in theSTAGING_DIRfor the libraries. It allows ./configure scripts to properly compile the small test programs testing whether a dependency is properly installed.* The
TARGET_CFLAGScontains a new -Wl,--rpath-link option for both $(STAGING_DIR)/lib and $(STAGING_DIR)/usr/lib. It allows library depending on other libraries to link properly. TheTARGET_CFLAGSis exposed as CFLAGS inTARGET_CONFIGURE_OPTS.This new version fixes a problem encountered by hartleys <[email protected]> when building the kernel. The problem was that the -Wl,--rpath-link options were added to LDFLAGS, while there are options for the C compiler, not the ld linker. Moving them to CFLAGS seems to fix the issue.
Signed-off-by Thomas Petazzoni <[email protected]>Modified:
trunk/buildroot/package/Makefile.inChangeset:
Modified: trunk/buildroot/package/Makefile.in
===================================================================
--- trunk/buildroot/package/Makefile.in 2008-11-11 11:43:27 UTC (rev 23999)
+++ trunk/buildroot/package/Makefile.in 2008-11-11 18:32:31 UTC (rev 24000)buildroot/package/Makefile.in +2
-1@@ -38,7 +38,8 @@ ######################################################################### ifeq ($(BR2_TOOLCHAIN_SOURCE),y) TARGET_CFLAGS=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) \ - -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include + -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include \ + -Wl,--rpath-link -Wl,$(STAGING_DIR)/lib -Wl,--rpath-link -Wl,$(STAGING_DIR)/usr/libTARGET_LDFLAGS+=-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib ifeq ($(BR2_TOOLCHAIN_SYSROOT),y)
TARGET_CFLAGS+= $(BR2_SYSROOT) $(BR2_ISYSROOT)buildroot/package/Makefile.in +0
-0@@ -89,7 +90,9 @@ # else it's an external toolchain #########################################################################else
-TARGET_CFLAGS=$(TARGET_OPTIMIZATION)
$(TARGET_DEBUGGING) -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include(quoted diff) +2
-1-I$(TOOLCHAIN_EXTERNAL_PATH)/$(TOOLCHAIN_EXTERNAL_PREFIX)/include +TARGET_CFLAGS=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) \ + -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include -I$(TOOLCHAIN_EXTERNAL_PATH)/$(TOOLCHAIN_EXTERNAL_PREFIX)/include\
+ -Wl,--rpath-link -Wl,$(STAGING_DIR)/lib -Wl,--rpath-link -Wl,$(STAGING_DIR)/usr/lib TARGET_CXXFLAGS=$(TARGET_CFLAGS)
TARGET_LDFLAGS=-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib
endifbuildroot/package/Makefile.in +5
-2@@ -126,7 +129,8 @@ #")) #TOOL_BUILD_DIR=$(BASE_DIR)/$(TOPDIR_PREFIX)toolchain_build_$(TOOLCHAIN_EXTERNAL_PREFIX) TOOL_BUILD_DIR=$(BASE_DIR)/$(TOPDIR_PREFIX)toolchain_build_$(ARCH)$(COND_ARCH_FPU_SUFFIX)$(TOPDIR_SUFFIX) -TARGET_PATH="$(STAGING_DIR)/bin:$(TOOL_BUILD_DIR)/bin:$(TOOLCHAIN_EXTERNAL_PATH)/bin:$(PATH)" +# Make sure that STAGING_DIR/usr/bin is in path for freetype-config etc. +TARGET_PATH="$(STAGING_DIR)/usr/bin:$(STAGING_DIR)/bin:$(TOOL_BUILD_DIR)/bin:$(TOOLCHAIN_EXTERNAL_PATH)/bin:$(PATH)" #IMAGE:=$(BINARIES_DIR)/$(BR2_ROOTFS_PREFIX).$(TOOLCHAIN_EXTERNAL_PREFIX)$(ROOTFS_SUFFIX) IMAGE:=$(BINARIES_DIR)/$(BR2_ROOTFS_PREFIX).$(ARCH)$(COND_ARCH_FPU_SUFFIX)$(ROOTFS_SUFFIX)@@ -196,7 +200,9 @@ TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \ AR="$(TARGET_AR)" \ AS="$(TARGET_AS)" \ - LD="$(TARGET_LD) $(TARGET_LDFLAGS)" \ + LD="$(TARGET_LD)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ NM="$(TARGET_NM)" \ CC="$(TARGET_CC) $(TARGET_CFLAGS)" \ GCC="$(TARGET_CC) $(TARGET_CFLAGS)" \_______________________________________________
buildroot mailing list
buildroot at uclibc.org
http://busybox.net/mailman/listinfo/buildroot
Le Tue, 11 Nov 2008 18:46:36 -0000,
<[email protected]> a ?crit :
Quoted 2 lines
I have just completed local testing of
AUTO_CONFIGURE_TARGETthat the GIT based buildroot is using.
Great !
Quoted 4 lines
After I get this back (tomorrow) I suspect that some Makefile.autotools.in packages might not build
I will post some common things to try to fix these I just cant build all packages before feeding this back.
Can you post the patch for review before committing. It is quite an important change, some review will probably lead to interesting comments.
Moreover, as it will not possible to test all packages before committing, I'd suggest to commit the patch with the cache disabled by default. People who are willing to test in their configuration can enable the new feature with just a simple configuration change. By doing so, we won't break the build of people not willing to test, while still increasing the testing of this nice new feature.
Quoted 9 lines
It has highlighted an issue with the sheer number of config options that are being hardcoded for packages like GTK etc!
Do we really need this huge number of configure options? surely configure is not that bad at sniffing values?
The problem is that setting these values by hand means they override settings in the cache file which means for example GTK disables CXX compiler, yet I have a perfectly working compiler.
WebKit then tries to build after GTK and says I have no CXX compiler. Deleting this hardcoded config flag means the cache file works.
I'm not quite sure what to do with all these changes. But some of them are probably necessary: the purpose of ./configure is to compile and run some small test programs to see if some features are available or not. However, in cross-compiling mode, running these test programs is not possible, so overriding configuration options might be necessary.
However, clearly, the case of ac_cv_prog_CXX is wrong. The value of this option should be computed in package/Makefile.in depending on the configuration, and should be added to TARGET_CONFIGURE_ARGS, which is passed to the ./configure script thanks to the Makefile.autools.in machinery.
Cheers,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers and embedded Linux development, consulting, training and support. http://free-electrons.com
Agreed, a patch will be posted first and the default will be no cache used.
cheers
Dan
--------------------------------------------------
From: "Thomas Petazzoni" <[email protected]>
Sent: Tuesday, November 11, 2008 7:10 PM
To: <[email protected]>
Subject: Re: [Buildroot] svn commit: trunk/buildroot/package
Quoted 58 lines
Le Tue, 11 Nov 2008 18:46:36 -0000,
<[email protected]> a ?crit :Quoted 2 lines
I have just completed local testing of
AUTO_CONFIGURE_TARGETthat the GIT based buildroot is using.Great !
Quoted 4 lines
After I get this back (tomorrow) I suspect that some Makefile.autotools.in packages might not build
I will post some common things to try to fix these I just cant build all packages before feeding this back.Can you post the patch for review before committing. It is quite an important change, some review will probably lead to interesting comments.
Moreover, as it will not possible to test all packages before committing, I'd suggest to commit the patch with the cache disabled by default. People who are willing to test in their configuration can enable the new feature with just a simple configuration change. By doing so, we won't break the build of people not willing to test, while still increasing the testing of this nice new feature.
Quoted 9 lines
It has highlighted an issue with the sheer number of config options that are being hardcoded for packages like GTK etc!
Do we really need this huge number of configure options? surely configure is not that bad at sniffing values?
The problem is that setting these values by hand means they override settings in the cache file which means for example GTK disables CXX compiler, yet I have a perfectly working compiler.
WebKit then tries to build after GTK and says I have no CXX compiler. Deleting this hardcoded config flag means the cache file works.I'm not quite sure what to do with all these changes. But some of them are probably necessary: the purpose of ./configure is to compile and run some small test programs to see if some features are available or not. However, in cross-compiling mode, running these test programs is not possible, so overriding configuration options might be necessary.
However, clearly, the case of
ac_cv_prog_CXXis wrong. The value of this option should be computed in package/Makefile.in depending on the configuration, and should be added toTARGET_CONFIGURE_ARGS, which is passed to the ./configure script thanks to the Makefile.autools.in machinery.Cheers,
Thomas
Signature · 8 lines
Thomas Petazzoni, Free Electrons Kernel, drivers and embedded Linux development, consulting, training and support. http://free-electrons.com _______________________________________________ buildroot mailing list buildroot at uclibc.org http://busybox.net/mailman/listinfo/buildroot
Quoted 24 lines · Thomas Petazzoni
Fix external toolchain build
This patch is a new version of a patch already sent several times on the mailing-list, committed and reverted a few times by Daniel Laird, due to several imperfections. This version is a new try at finding a solution that works for everybody. Hopefully it'll work :-)
The original problem is that external toolchain builds failed because packages couldn't find their dependent libraries at configure time and could not be linked with them. To fix these two problems, two things are added:
* The
TARGET_LDFLAGSvariable was exposed as LDFLAGS at ./configure time thanks toTARGET_CONFIGURE_OPTS. TheTARGET_LDFLAGSvariable contains -L options with the path in theSTAGING_DIRfor the libraries. It allows ./configure scripts to properly compile the small test programs testing whether a dependency is properly installed.* The
TARGET_CFLAGScontains a new -Wl,--rpath-link option for both $(STAGING_DIR)/lib and $(STAGING_DIR)/usr/lib. It allows library depending on other libraries to link properly. TheTARGET_CFLAGSis exposed as CFLAGS inTARGET_CONFIGURE_OPTS.
Quoted 5 lines
This new version fixes a problem encountered by hartleys <[email protected]> when building the kernel. The problem was that the -Wl,--rpath-link options were added to LDFLAGS, while there are options for the C compiler, not the ld linker. Moving them to CFLAGS seems to fix the issue.
Grk... Well, the patch kind of fixes my problem. At least the kernel builds ;-)
Each source file hit with CC produces a warning message. Everything hit with LD is fine. Here's a snip of the output:
...
LD lib/zlib_inflate/zlib_inflate.o LD lib/zlib_inflate/built-in.o CC lib/audit.o
arm-linux-gcc: --rpath-link: linker input file unused because linking not done
arm-linux-gcc: /home/bigguiness/buildroot/build_arm/staging_dir/lib:
linker input file unused because linking not done
arm-linux-gcc: --rpath-link: linker input file unused because linking not done
arm-linux-gcc: /home/bigguiness/buildroot/build_arm/staging_dir/usr/lib:
linker input file unused because linking not done
LD lib/built-in.o
CC lib/argv_split.o
arm-linux-gcc: --rpath-link: linker input file unused because linking not done
arm-linux-gcc: /home/bigguiness/buildroot/build_arm/staging_dir/lib:
linker input file unused because linking not done
arm-linux-gcc: --rpath-link: linker input file unused because linking not done
arm-linux-gcc: /home/bigguiness/buildroot/build_arm/staging_dir/usr/lib:
linker input file unused because linking not done
CC lib/cmdline.o
arm-linux-gcc: --rpath-link: linker input file unused because linking not done
arm-linux-gcc: /home/bigguiness/buildroot/build_arm/staging_dir/lib:
linker input file unused because linking not done
arm-linux-gcc: --rpath-link: linker input file unused because linking not done
arm-linux-gcc: /home/bigguiness/buildroot/build_arm/staging_dir/usr/lib:
linker input file unused because linking not done
...
Regards,
Hartley
Le Tue, 11 Nov 2008 20:09:06 -0500, "hartleys" <[email protected]> a ?crit :
Quoted 7 lines
Each source file hit with CC produces a warning message. Everything hit with LD is fine. Here's a snip of the output:
...
LD lib/zlib_inflate/zlib_inflate.o LD lib/zlib_inflate/built-in.o CC lib/audit.o
Quoted 8 lines
arm-linux-gcc: --rpath-link: linker input file unused because linking not done
arm-linux-gcc:/home/bigguiness/buildroot/build_arm/staging_dir/lib:
linker input file unused because linking not done
arm-linux-gcc: --rpath-link: linker input file unused because linking not done
arm-linux-gcc:/home/bigguiness/buildroot/build_arm/staging_dir/usr/lib:
linker input file unused because linking not done
Odd. I did try to build the kernel and didn't see this messages. I will try something else.
Sincerly,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers and embedded Linux development, consulting, training and support. http://free-electrons.com
Quoted 20 lines · Thomas Petazzoni
Le Tue, 11 Nov 2008 20:09:06 -0500, "hartleys" <[email protected]> a ?crit :
Quoted 7 lines
Each source file hit with CC produces a warning message. Everything hit with LD is fine. Here's a snip of the output:
...
LD lib/zlib_inflate/zlib_inflate.o LD lib/zlib_inflate/built-in.o CC lib/audit.oQuoted 9 lines
arm-linux-gcc: --rpath-link: linker input file unused because linking not done
arm-linux-gcc:/home/bigguiness/buildroot/build_arm/staging_dir/lib:
linker input file unused because linking not done
arm-linux-gcc: --rpath-link: linker input file unused because linking not done
arm-linux-gcc:/home/bigguiness/buildroot/build_arm/staging_dir/usr/lib:
linker input file unused because linking not done
Quoted 7 lines
Odd. I did try to build the kernel and didn't see this messages. I will
try something else.Sincerly,
Thomas
This also happen when building for AVR32.
Greets
Arnar Mar Sig
Valka ehf
2008/11/12 Arnar Mar Sig <[email protected]>:
Quoted 27 lines · Thomas Petazzoni
Quoted 25 lines
Le Tue, 11 Nov 2008 20:09:06 -0500, "hartleys" <[email protected]> a ?crit :
Quoted 7 lines
Each source file hit with CC produces a warning message. Everything hit with LD is fine. Here's a snip of the output:
...
LD lib/zlib_inflate/zlib_inflate.o LD lib/zlib_inflate/built-in.o CC lib/audit.oQuoted 9 lines
arm-linux-gcc: --rpath-link: linker input file unused because linking not done
arm-linux-gcc:/home/bigguiness/buildroot/build_arm/staging_dir/lib:
linker input file unused because linking not done
arm-linux-gcc: --rpath-link: linker input file unused because linking not done
arm-linux-gcc:/home/bigguiness/buildroot/build_arm/staging_dir/usr/lib:
linker input file unused because linking not doneOdd. I did try to build the kernel and didn't see this messages. I will
try something else.
Quoted 6 lines
Quoted 3 lines
Sincerly,
Thomas
This also happen when building for AVR32.
It happens in i586 too, please take a look to this report
http://busybox.net/bugs/view.php?id=6324
may be it is related with your changes.
Ciao,
Signature · 1 line
/roberto
We have some issues regarding this patch.
The problem is that buildroot when it builds its own compiler gets rpath etc setup properly.
If you try to build buildroot with an external toolchain then this fails and various issues are seen.
Currently Thomas and myself have posted various forms of a patch that tries to get buildroot working
with an external toolchain as both of us (I believe) require this functionality.
The problem appears to be that if *-gcc is compiling to a object file then the --rpath-link options are not necessary and it complains. currently however when gcc is doing the linking then it requires the --rpath options.
I am not a gcc expert or a particular toolchain expert so I would love someone who might know to try and
help us on how to use an external toolchain with buildroot and the correct --rpath flags at the right time.
I have found some stuff on LD_RUN_PATH, maybe this could be used? any help is really appreciated,
it currently seems a shame that buildroot and external toolchain support is not quite as good as it could be!
cheers
daniel Laird
--------------------------------------------------
From: "Roberto A. Foglietta" <[email protected]>
Sent: Saturday, November 15, 2008 6:06 AM
To: "Arnar Mar Sig" <[email protected]>
Cc: <[email protected]>
Subject: Re: [Buildroot] svn commit: trunk/buildroot/package
Quoted 49 lines
2008/11/12 Arnar Mar Sig <[email protected]>:
Quoted 27 lines · Thomas Petazzoni
Quoted 25 lines
Le Tue, 11 Nov 2008 20:09:06 -0500, "hartleys" <[email protected]> a ?crit :
Quoted 7 lines
Each source file hit with CC produces a warning message. Everything hit with LD is fine. Here's a snip of the output:
...
LD lib/zlib_inflate/zlib_inflate.o LD lib/zlib_inflate/built-in.o CC lib/audit.oQuoted 9 lines
arm-linux-gcc: --rpath-link: linker input file unused because linking not done
arm-linux-gcc:/home/bigguiness/buildroot/build_arm/staging_dir/lib:
linker input file unused because linking not done
arm-linux-gcc: --rpath-link: linker input file unused because linking not done
arm-linux-gcc:/home/bigguiness/buildroot/build_arm/staging_dir/usr/lib:
linker input file unused because linking not doneOdd. I did try to build the kernel and didn't see this messages. I will
try something else.Quoted 6 lines
Quoted 3 lines
Sincerly,
Thomas
This also happen when building for AVR32.
It happens in i586 too, please take a look to this report
http://busybox.net/bugs/view.php?id=6324
may be it is related with your changes.
Ciao,
Signature · 5 lines
/roberto _______________________________________________ buildroot mailing list buildroot at uclibc.org http://busybox.net/mailman/listinfo/buildroot
I have also found some stuff suggesting
-R /PATH/To/LIBRARIES can be passed to LD_FLAGS
perhaps we could use that?
i.e
-R $(STAGING_DIR)/lib -R$(STAGING_DIR)/usr/lib
As is seems LD__RUN_PATH gets overridden all the time.
Any one with advice welcome!
Daniel Laird
--------------------------------------------------
From: <[email protected]>
Sent: Saturday, November 15, 2008 9:22 AM
To: "Roberto A. Foglietta" <[email protected]>; "Arnar Mar Sig" <[email protected]>
Cc: <[email protected]>
Subject: Re: [Buildroot] svn commit: trunk/buildroot/package
Quoted 94 lines
We have some issues regarding this patch.
The problem is that buildroot when it builds its own compiler gets rpath etc
setup properly.
If you try to build buildroot with an external toolchain then this fails and
various issues are seen.Currently Thomas and myself have posted various forms of a patch that tries
to get buildroot working
with an external toolchain as both of us (I believe) require this functionality.The problem appears to be that if *-gcc is compiling to a object file then the --rpath-link options are not necessary and it complains. currently however when gcc is doing the linking then it requires the --rpath
options.I am not a gcc expert or a particular toolchain expert so I would love someone who might know to try and
help us on how to use an external toolchain with buildroot and the correct --rpath flags at the right time.I have found some stuff on
LD_RUN_PATH, maybe this could be used? any help is really appreciated,
it currently seems a shame that buildroot and external toolchain support is
not quite as good as it could be!cheers
daniel Laird
--------------------------------------------------
From: "Roberto A. Foglietta" <[email protected]>
Sent: Saturday, November 15, 2008 6:06 AM
To: "Arnar Mar Sig" <[email protected]>
Cc: <[email protected]>
Subject: Re: [Buildroot] svn commit: trunk/buildroot/packageQuoted 35 lines
2008/11/12 Arnar Mar Sig <[email protected]>:
Quoted 27 lines · Thomas Petazzoni
Quoted 25 lines
Le Tue, 11 Nov 2008 20:09:06 -0500, "hartleys" <[email protected]> a ?crit :
Quoted 7 lines
Each source file hit with CC produces a warning message. Everything hit with LD is fine. Here's a snip of the output:
...
LD lib/zlib_inflate/zlib_inflate.o LD lib/zlib_inflate/built-in.o CC lib/audit.oQuoted 9 lines
arm-linux-gcc: --rpath-link: linker input file unused because linking not done
arm-linux-gcc:/home/bigguiness/buildroot/build_arm/staging_dir/lib:
linker input file unused because linking not done
arm-linux-gcc: --rpath-link: linker input file unused because linking not done
arm-linux-gcc:/home/bigguiness/buildroot/build_arm/staging_dir/usr/lib:
linker input file unused because linking not doneOdd. I did try to build the kernel and didn't see this messages. I will
try something else.Quoted 6 lines
Quoted 3 lines
Sincerly,
Thomas
This also happen when building for AVR32.
Quoted 14 lines
It happens in i586 too, please take a look to this report
http://busybox.net/bugs/view.php?id=6324
may be it is related with your changes.
Ciao,
Signature · 5 lines
/roberto _______________________________________________ buildroot mailing list buildroot at uclibc.org http://busybox.net/mailman/listinfo/buildroot_______________________________________________
buildroot mailing list
buildroot at uclibc.org
http://busybox.net/mailman/listinfo/buildroot
Hi,
Unfortunately at this time I cannot help you in external toolchain support.
The problem is not only that gcc complains but X server does not
compile at all.
2008/11/15 <[email protected]>:
Quoted 85 lines
We have some issues regarding this patch.
The problem is that buildroot when it builds its own compiler gets rpath etc setup properly.
If you try to build buildroot with an external toolchain then this fails and various issues are seen.Currently Thomas and myself have posted various forms of a patch that tries to get buildroot working
with an external toolchain as both of us (I believe) require this functionality.The problem appears to be that if *-gcc is compiling to a object file then the --rpath-link options are not necessary and it complains. currently however when gcc is doing the linking then it requires the --rpath options.
I am not a gcc expert or a particular toolchain expert so I would love someone who might know to try and
help us on how to use an external toolchain with buildroot and the correct --rpath flags at the right time.I have found some stuff on
LD_RUN_PATH, maybe this could be used? any help is really appreciated,
it currently seems a shame that buildroot and external toolchain support is not quite as good as it could be!cheers
daniel Laird
--------------------------------------------------
From: "Roberto A. Foglietta" <[email protected]>
Sent: Saturday, November 15, 2008 6:06 AM
To: "Arnar Mar Sig" <[email protected]>
Cc: <[email protected]>
Subject: Re: [Buildroot] svn commit: trunk/buildroot/packageQuoted 49 lines
2008/11/12 Arnar Mar Sig <[email protected]>:
Quoted 27 lines · Thomas Petazzoni
Quoted 25 lines
Le Tue, 11 Nov 2008 20:09:06 -0500, "hartleys" <[email protected]> a ?crit :
Quoted 7 lines
Each source file hit with CC produces a warning message. Everything hit with LD is fine. Here's a snip of the output:
...
LD lib/zlib_inflate/zlib_inflate.o LD lib/zlib_inflate/built-in.o CC lib/audit.oQuoted 9 lines
arm-linux-gcc: --rpath-link: linker input file unused because linking not done
arm-linux-gcc:/home/bigguiness/buildroot/build_arm/staging_dir/lib:
linker input file unused because linking not done
arm-linux-gcc: --rpath-link: linker input file unused because linking not done
arm-linux-gcc:/home/bigguiness/buildroot/build_arm/staging_dir/usr/lib:
linker input file unused because linking not doneOdd. I did try to build the kernel and didn't see this messages. I will
try something else.Quoted 6 lines
Quoted 3 lines
Sincerly,
Thomas
This also happen when building for AVR32.
It happens in i586 too, please take a look to this report
http://busybox.net/bugs/view.php?id=6324
may be it is related with your changes.
Ciao,
--
/roberto
_______________________________________________
buildroot mailing list
buildroot at uclibc.org
http://busybox.net/mailman/listinfo/buildroot
Signature · 1 line
/roberto
All,
I have been looking a bit more into the issues around the --rpath-link options.
1. It seems that we should only do this for people using external toolchains as currently it appears buildroot built toolchains are ok.
2. I think that we could use --sysroot cflags.
This is only supported in GCC 4.2 and later so this would need to be
checked.
We would then need to copy all compiler includes into
$STAGING_DIR/usr/include
Then I believe we could pass --sysroot=$STAGING_DIR as a cflag and this
should then pick up all headers and libraries.
Does anyone have any thoughts on this. I have not tried it yet but perhaps
you have?
Hope you can help
Daniel Laird
-----Original Message-----
From: [email protected] [mailto:buildroot-bounces at uclibc.org] On Behalf Of Roberto A. Foglietta
Sent: 2008 Nov 15 06:07
To: Arnar Mar Sig
Cc: buildroot at uclibc.org
Subject: Re: [Buildroot] svn commit: trunk/buildroot/package
2008/11/12 Arnar Mar Sig <[email protected]>:
Quoted 27 lines · Thomas Petazzoni
Quoted 25 lines
Le Tue, 11 Nov 2008 20:09:06 -0500, "hartleys" <[email protected]> a ?crit :
Quoted 7 lines
Each source file hit with CC produces a warning message. Everything hit with LD is fine. Here's a snip of the output:
...
LD lib/zlib_inflate/zlib_inflate.o LD lib/zlib_inflate/built-in.o CC lib/audit.oQuoted 9 lines
arm-linux-gcc: --rpath-link: linker input file unused because linking not done
arm-linux-gcc:/home/bigguiness/buildroot/build_arm/staging_dir/lib:
linker input file unused because linking not done
arm-linux-gcc: --rpath-link: linker input file unused because linking not done
arm-linux-gcc:/home/bigguiness/buildroot/build_arm/staging_dir/usr/lib:
linker input file unused because linking not doneOdd. I did try to build the kernel and didn't see this messages. I will
try something else.
Quoted 6 lines
Quoted 3 lines
Sincerly,
Thomas
This also happen when building for AVR32.
It happens in i586 too, please take a look to this report
http://busybox.net/bugs/view.php?id=6324
may be it is related with your changes.
Ciao,
Signature · 5 lines
/roberto _______________________________________________ buildroot mailing list buildroot at uclibc.org http://busybox.net/mailman/listinfo/buildroot
Weber
Hi,
I'm running into problems here since this last patch.
The situation:
I had a buildroot from 10-14-2008 which worked fine on my Fedora 9 box here. However once my colleague tried to build the same tree on his Ubuntu 7.x and 8.x machines he reported the issues some of you are seeing with the wrong linker paths. So he could not build the tree. After applying your patch, however, it doesn't build on either machine anymore. I get the reported issues with warnings ("linker input file unused because linking not done") and eventually it breaks the build during gdb-6.8.
I attached the error message bellow.
I got both to work by doing the following:
- I removed the rpath statements from the non-external-toolchain part in package/Makefile.in. The rest of the change I left intact.
After doing that additional things came up:
- The fontconfig Makefile(fontconfig.mk) has to be changed since the CFLAGS are overridden with target specifics and since it compiles (partly) on the host machine it breaks the build. So the CFLAGS have to be HOSTCFLAGS when configuring.
- DirectFB has problems with the CFLAGS as well. The configured CFLAGS are overwritten when building with TARGET_CONFIGURE_OPTS. So remove that.
I attached the patches to this email. I hope this helps!
-Bernd
/workspace/ubuntu/trunk/tools/buildroot/build_mipsel/staging_dir/usr/bin/mipsel-linux-uclibc-gcc -Os -I/workspace/ubuntu/trunk/tools/buildroot/build_mipsel/staging_dir/usr/include -I/workspace/ubuntu/trunk/tools/buildroot/build_mipsel/staging_dir/include -Wl,--rpath-link -Wl,/workspace/ubuntu/trunk/tools/buildroot/build_mipsel/staging_dir/lib -Wl,--rpath-link -Wl,/workspace/ubuntu/trunk/tools/buildroot/build_mipsel/staging_dir/usr/lib -mtune=mips32r2 -mabi=32 -msoft-float -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -c -DHAVE_CONFIG_H -Os -I/workspace/ubuntu/trunk/tools/buildroot/build_mipsel/staging_dir/usr/include -I/workspace/ubuntu/trunk/tools/buildroot/build_mipsel/staging_dir/include -Wl,--rpath-link -Wl,/workspace/ubuntu/trunk/tools/buildroot/build_mipsel/staging_dir/lib -Wl,--rpath-link -Wl,/workspace/ubuntu/trunk/tools/buildroot/build_mipsel/staging_dir/usr/lib -mtune=mips32r2 -mabi=32 -msoft-float -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -L/workspace/ubuntu/trunk/tools/buildroot/build_mipsel/staging_dir/lib -L/workspace/ubuntu/trunk/tools/buildroot/build_mipsel/staging_dir/usr/lib -Wno-error -I. -I/workspace/ubuntu/trunk/tools/buildroot/toolchain_build_mipsel/gdb-6.8/libiberty/../include -W -Wall -Wwrite-strings -Wstrict-prototypes -pedantic /workspace/ubuntu/trunk/tools/buildroot/toolchain_build_mipsel/gdb-6.8/libiberty/fibheap.c -o fibheap.o
mipsel-linux-uclibc-gcc: --rpath-link: linker input file unused because linking not done
mipsel-linux-uclibc-gcc: /workspace/ubuntu/trunk/tools/buildroot/build_mipsel/staging_dir/lib: linker input file unused because linking not done
mipsel-linux-uclibc-gcc: --rpath-link: linker input file unused because linking not done
mipsel-linux-uclibc-gcc: /workspace/ubuntu/trunk/tools/buildroot/build_mipsel/staging_dir/usr/lib: linker input file unused because linking not done
mipsel-linux-uclibc-gcc: --rpath-link: linker input file unused because linking not done
mipsel-linux-uclibc-gcc: /workspace/ubuntu/trunk/tools/buildroot/build_mipsel/staging_dir/lib: linker input file unused because linking not done
mipsel-linux-uclibc-gcc: --rpath-link: linker input file unused because linking not done
mipsel-linux-uclibc-gcc: /workspace/ubuntu/trunk/tools/buildroot/build_mipsel/staging_dir/usr/lib: linker input file unused because linking not done
/workspace/ubuntu/trunk/tools/buildroot/toolchain_build_mipsel/gdb-6.8/libiberty/fibheap.c: In function 'fibheap_union':
/workspace/ubuntu/trunk/tools/buildroot/toolchain_build_mipsel/gdb-6.8/libiberty/fibheap.c:151: warning: implicit declaration of function 'free'
/workspace/ubuntu/trunk/tools/buildroot/toolchain_build_mipsel/gdb-6.8/libiberty/fibheap.c: In function 'fibheap_delete_node':
/workspace/ubuntu/trunk/tools/buildroot/toolchain_build_mipsel/gdb-6.8/libiberty/fibheap.c:258: error: 'LONG_MIN' undeclared (first use in this function)
/workspace/ubuntu/trunk/tools/buildroot/toolchain_build_mipsel/gdb-6.8/libiberty/fibheap.c:258: error: (Each undeclared identifier is reported only once
/workspace/ubuntu/trunk/tools/buildroot/toolchain_build_mipsel/gdb-6.8/libiberty/fibheap.c:258: error: for each function it appears in.)
/workspace/ubuntu/trunk/tools/buildroot/toolchain_build_mipsel/gdb-6.8/libiberty/fibheap.c: In function 'fibheap_consolidate':
/workspace/ubuntu/trunk/tools/buildroot/toolchain_build_mipsel/gdb-6.8/libiberty/fibheap.c:360: warning: implicit declaration of function 'memset'
/workspace/ubuntu/trunk/tools/buildroot/toolchain_build_mipsel/gdb-6.8/libiberty/fibheap.c:360: warning: incompatible implicit declaration of built-in function 'memset'
make[3]: *** [fibheap.o] Error 1
make[3]: Leaving directory `/workspace/ubuntu/trunk/tools/buildroot/build_mipsel/gdb-6.8-target/libiberty'
make[2]: *** [all-libiberty] Error 2
make[2]: Leaving directory `/workspace/ubuntu/trunk/tools/buildroot/build_mipsel/gdb-6.8-target'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/workspace/ubuntu/trunk/tools/buildroot/build_mipsel/gdb-6.8-target'
make: *** [/workspace/ubuntu/trunk/tools/buildroot/build_mipsel/gdb-6.8-target/gdb/gdb] Error 2
Makefile.in renamed from temp/buildroot/package/Makefile.in +1 -2
@@ -38,8 +38,7 @@ ######################################################################### ifeq ($(BR2_TOOLCHAIN_SOURCE),y) TARGET_CFLAGS=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) \ - -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include \ - -Wl,--rpath-link -Wl,$(STAGING_DIR)/lib -Wl,--rpath-link -Wl,$(STAGING_DIR)/usr/lib + -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include TARGET_LDFLAGS+=-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib ifeq ($(BR2_TOOLCHAIN_SYSROOT),y) TARGET_CFLAGS+= $(BR2_SYSROOT) $(BR2_ISYSROOT)
directfb/directfb.mk renamed from temp/buildroot/package/directfb/directfb.mk +0 -1
@@ -147,7 +151,6 @@ $(DIRECTFB_DIR)/.compiled: $(DIRECTFB_DIR)/.configured $(MAKE) PATH=$(STAGING_DIR)/usr/lib:$(PATH) \ - $(TARGET_CONFIGURE_OPTS) \ -C $(DIRECTFB_DIR) touch $(DIRECTFB_DIR)/.compiled
fontconfig/fontconfig.mk renamed from temp/buildroot/package/fontconfig/fontconfig.mk +1 -1
@@ -10,7 +10,7 @@ FONTCONFIG_INSTALL_STAGING = YES FONTCONFIG_INSTALL_TARGET = YES -FONTCONFIG_CONF_OPT = --with-arch=$(GNU_TARGET_NAME) \ +FONTCONFIG_CONF_OPT = CFLAGS=$(HOSTCFLAGS) --with-arch=$(GNU_TARGET_NAME) \ --with-freetype-config="$(STAGING_DIR)/usr/bin/freetype-config" \ --with-expat="$(STAGING_DIR)/usr/lib" \ --with-expat-lib=$(STAGING_DIR)/usr/lib \
-----Original Message-----
From: [email protected] [mailto:buildroot-bounces at uclibc.org] On Behalf Of Daniel Laird
Sent: Monday, November 17, 2008 3:54 AM
To: 'Roberto A. Foglietta'; 'Arnar Mar Sig'; 'Thomas Petazzoni'
Cc: buildroot at uclibc.org
Subject: Re: [Buildroot] svn commit: trunk/buildroot/package
All,
I have been looking a bit more into the issues around the --rpath-link options.
1. It seems that we should only do this for people using external toolchains as currently it appears buildroot built toolchains are ok.
2. I think that we could use --sysroot cflags.
This is only supported in GCC 4.2 and later so this would need to be
checked.
We would then need to copy all compiler includes into
$STAGING_DIR/usr/include
Then I believe we could pass --sysroot=$STAGING_DIR as a cflag and this
should then pick up all headers and libraries.
Does anyone have any thoughts on this. I have not tried it yet but perhaps
you have?
Hope you can help
Daniel Laird
-----Original Message-----
From: [email protected] [mailto:buildroot-bounces at uclibc.org] On Behalf Of Roberto A. Foglietta
Sent: 2008 Nov 15 06:07
To: Arnar Mar Sig
Cc: buildroot at uclibc.org
Subject: Re: [Buildroot] svn commit: trunk/buildroot/package
2008/11/12 Arnar Mar Sig <[email protected]>:
Quoted 27 lines · Thomas Petazzoni
Quoted 25 lines
Le Tue, 11 Nov 2008 20:09:06 -0500, "hartleys" <[email protected]> a ?crit :
Quoted 7 lines
Each source file hit with CC produces a warning message. Everything hit with LD is fine. Here's a snip of the output:
...
LD lib/zlib_inflate/zlib_inflate.o LD lib/zlib_inflate/built-in.o CC lib/audit.oQuoted 9 lines
arm-linux-gcc: --rpath-link: linker input file unused because linking not done
arm-linux-gcc:/home/bigguiness/buildroot/build_arm/staging_dir/lib:
linker input file unused because linking not done
arm-linux-gcc: --rpath-link: linker input file unused because linking not done
arm-linux-gcc:/home/bigguiness/buildroot/build_arm/staging_dir/usr/lib:
linker input file unused because linking not doneOdd. I did try to build the kernel and didn't see this messages. I will
try something else.
Quoted 6 lines
Quoted 3 lines
Sincerly,
Thomas
This also happen when building for AVR32.
It happens in i586 too, please take a look to this report
http://busybox.net/bugs/view.php?id=6324
may be it is related with your changes.
Ciao,
Signature · 17 lines
/roberto _______________________________________________ buildroot mailing list buildroot at uclibc.org http://busybox.net/mailman/listinfo/buildroot _______________________________________________ buildroot mailing list buildroot at uclibc.org http://busybox.net/mailman/listinfo/buildroot ----------------------------------------- This message (including any attachments) may contain confidential information intended for a specific individual and purpose. If you are not the intended recipient, delete this message. If you are not the intended recipient, disclosing, copying, distributing, or taking any action based on this message is strictly prohibited.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"tpetazzoni" == tpetazzoni <[email protected]> writes:
tpetazzoni> Author: tpetazzoni
tpetazzoni> Date: 2008-11-11 10:32:31 -0800 (Tue, 11 Nov 2008) tpetazzoni> New Revision: 24000
tpetazzoni> Log:
tpetazzoni> Fix external toolchain build
tpetazzoni> This new version fixes a problem encountered by hartleys tpetazzoni> <[email protected]> when building the kernel. The problem tpetazzoni> was that the -Wl,--rpath-link options were added to LDFLAGS, while tpetazzoni> there are options for the C compiler, not the ld linker. Moving them tpetazzoni> to CFLAGS seems to fix the issue.
But it makes gcc spit out a bunch of warnings, E.G. for busybox:
CC util-linux/umount.o
i386-linux-uclibc-gcc: --rpath-link: linker input file unused because linking not done
i386-linux-uclibc-gcc: /tmp/br/build_i386/staging_dir/lib: linker input file unused because linking not done
i386-linux-uclibc-gcc: --rpath-link: linker input file unused because linking not done
i386-linux-uclibc-gcc: /tmp/br/build_i386/staging_dir/usr/lib: linker input file unused because linking not done
There must be a better way ..
Signature · 1 line
Bye, Peter Korsgaard
2008/11/15 Peter Korsgaard <[email protected]>:
Quoted 17 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"tpetazzoni" == tpetazzoni <[email protected]> writes:
tpetazzoni> Author: tpetazzoni
tpetazzoni> Date: 2008-11-11 10:32:31 -0800 (Tue, 11 Nov 2008) tpetazzoni> New Revision: 24000tpetazzoni> Log:
tpetazzoni> Fix external toolchain buildtpetazzoni> This new version fixes a problem encountered by hartleys tpetazzoni> <[email protected]> when building the kernel. The problem tpetazzoni> was that the -Wl,--rpath-link options were added to LDFLAGS, while tpetazzoni> there are options for the C compiler, not the ld linker. Moving them tpetazzoni> to CFLAGS seems to fix the issue.
But it makes gcc spit out a bunch of warnings, E.G. for busybox:
Quoted 8 lines
CC
util-linux/umount.o
i386-linux-uclibc-gcc: --rpath-link: linker input file unused because linking not done
i386-linux-uclibc-gcc:/tmp/br/build_i386/staging_dir/lib: linker input file unused because linking not done
i386-linux-uclibc-gcc: --rpath-link: linker input file unused because linking not done
i386-linux-uclibc-gcc:/tmp/br/build_i386/staging_dir/usr/lib: linker input file unused because linking not doneThere must be a better way ..
I see there are some packages which accept CCLD variable which can be set to
CCLD = $(CC) $(CCLDFLAGS)
I am not sure it could be a general solution if this variable is not
a standard one.
Ciao,
Signature · 1 line
/roberto
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
"Peter" == Peter Korsgaard <[email protected]> writes:
"tpetazzoni" == tpetazzoni <[email protected]> writes:
tpetazzoni> Author: tpetazzoni
tpetazzoni> Date: 2008-11-11 10:32:31 -0800 (Tue, 11 Nov 2008) tpetazzoni> New Revision: 24000
tpetazzoni> Log:
tpetazzoni> Fix external toolchain build
tpetazzoni> This new version fixes a problem encountered by hartleys tpetazzoni> <[email protected]> when building the kernel. The problem tpetazzoni> was that the -Wl,--rpath-link options were added to LDFLAGS, while tpetazzoni> there are options for the C compiler, not the ld linker. Moving them tpetazzoni> to CFLAGS seems to fix the issue.
Peter> But it makes gcc spit out a bunch of warnings, E.G. for busybox:
I'll revert r24000 for now until we find a proper fix as I didn't hear anything back.
Signature · 1 line
Bye, Peter Korsgaard
2008/11/11 <[email protected]>:
Quoted 6 lines
Author: tpetazzoni
Date: 2008-11-11 10:32:31 -0800 (Tue, 11 Nov 2008) New Revision: 24000Log:
Fix external toolchain build
While you are looking for a better solution I think this patch will save internal toolchain users from a lot of problems
roberto at rafbook:~/gles/buildroot$ svn diff -r24103 package/Makefile.in
Makefile.in (working copy) renamed from Makefile.in (revision 24103) +0 -0
@@ -38,8 +38,10 @@
#########################################################################
ifeq ($(BR2_TOOLCHAIN_SOURCE),y) TARGET_CFLAGS=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) \
- -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include \
- -Wl,--rpath-link -Wl,$(STAGING_DIR)/lib -Wl,--rpath-link -Wl,$(STAGING_DIR)/usr/lib
+ -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include +ifneq ($(strip $(BR2_TOOLCHAIN_EXTERNAL)),) +TARGET_CFLAGS+=-Wl,--rpath-link -Wl,$(STAGING_DIR)/lib -Wl,--rpath-link -Wl,$(STAGING_DIR)/usr/lib
+endif
TARGET_LDFLAGS+=-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib ifeq ($(BR2_TOOLCHAIN_SYSROOT),y)
TARGET_CFLAGS+= $(BR2_SYSROOT) $(BR2_ISYSROOT)
@@ -91,8 +93,10 @@
#########################################################################
else
TARGET_CFLAGS=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) \
- -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include -I$(TOOLCHAIN_EXTERNAL_PATH)/$(TOOLCHAIN_EXTERNAL_PREFIX)/include \
- -Wl,--rpath-link -Wl,$(STAGING_DIR)/lib -Wl,--rpath-link -Wl,$(STAGING_DIR)/usr/lib
+ -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include -I$(TOOLCHAIN_EXTERNAL_PATH)/$(TOOLCHAIN_EXTERNAL_PREFIX)/include +ifneq ($(strip $(BR2_TOOLCHAIN_EXTERNAL)),) +TARGET_CFLAGS+=-Wl,--rpath-link -Wl,$(STAGING_DIR)/lib -Wl,--rpath-link -Wl,$(STAGING_DIR)/usr/lib
+endif
TARGET_CXXFLAGS=$(TARGET_CFLAGS) TARGET_LDFLAGS=-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib endif
--
/roberto
-------------- next part --------------
A non-text attachment was scrubbed...
Name: package_Makefile.in.patch
Type: text/x-diff
Size: 1513 bytes
Desc: not available
Url : http://busybox.net/lists/buildroot/attachments/20081120/07d6dfb7/attachment.patch
Agreed, if someone else does not get there first I will try to apply tomorrow and save you guys.
I will then be posting my patch to allow support for using central cache file (saves configure time)
I then may post a patch for people to try that uses sysroot and isysroot
Cheers
Dan
--------------------------------------------------
From: "Roberto A. Foglietta" <[email protected]>
Sent: Thursday, November 20, 2008 2:56 PM
To: <[email protected]>
Subject: Re: [Buildroot] svn commit: trunk/buildroot/package
Quoted 59 lines
2008/11/11 <[email protected]>:
Quoted 6 lines
Author: tpetazzoni
Date: 2008-11-11 10:32:31 -0800 (Tue, 11 Nov 2008) New Revision: 24000Log:
Fix external toolchain buildWhile you are looking for a better solution I think this patch will save internal toolchain users from a lot of problems
roberto at rafbook:~/gles/buildroot$ svn diff -r24103 package/Makefile.in
Index: package/Makefile.in
===================================================================Makefile.in (working copy) renamed from Makefile.in (revision 24103) +4
-4@@ -38,8 +38,10 @@ ######################################################################### ifeq ($(BR2_TOOLCHAIN_SOURCE),y) TARGET_CFLAGS=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) \ - -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include \ - -Wl,--rpath-link -Wl,$(STAGING_DIR)/lib -Wl,--rpath-link -Wl,$(STAGING_DIR)/usr/lib + -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include +ifneq ($(strip $(BR2_TOOLCHAIN_EXTERNAL)),) +TARGET_CFLAGS+=-Wl,--rpath-link -Wl,$(STAGING_DIR)/lib -Wl,--rpath-link -Wl,$(STAGING_DIR)/usr/lib +endifTARGET_LDFLAGS+=-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib ifeq ($(BR2_TOOLCHAIN_SYSROOT),y)
TARGET_CFLAGS+= $(BR2_SYSROOT) $(BR2_ISYSROOT)Makefile.in (working copy) renamed from Makefile.in (revision 24103) +0
-0@@ -91,8 +93,10 @@ #########################################################################else
TARGET_CFLAGS=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) \
- -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/includeMakefile.in (working copy) renamed from Makefile.in (revision 24103) +4
-5-I$(TOOLCHAIN_EXTERNAL_PATH)/$(TOOLCHAIN_EXTERNAL_PREFIX)/include \ - -Wl,--rpath-link -Wl,$(STAGING_DIR)/lib -Wl,--rpath-link -Wl,$(STAGING_DIR)/usr/lib + -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include -I$(TOOLCHAIN_EXTERNAL_PATH)/$(TOOLCHAIN_EXTERNAL_PREFIX)/include +ifneq ($(strip $(BR2_TOOLCHAIN_EXTERNAL)),) +TARGET_CFLAGS+=-Wl,--rpath-link -Wl,$(STAGING_DIR)/lib -Wl,--rpath-link -Wl,$(STAGING_DIR)/usr/lib +endifTARGET_CXXFLAGS=$(TARGET_CFLAGS) TARGET_LDFLAGS=-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib endif
--
/roberto_______________________________________________
buildroot mailing list
buildroot at uclibc.org
http://busybox.net/mailman/listinfo/buildroot
Hi,
Le Thu, 20 Nov 2008 19:13:31 -0000,
<[email protected]> a ?crit :
Quoted 2 lines
Agreed, if someone else does not get there first I will try to apply tomorrow and save you guys.
Could you revert my patch, it is causing too much troubles for existing users. We must work on a better solution.
Quoted 4 lines
I will then be posting my patch to allow support for using central cache file (saves configure time)
I then may post a patch for people to try that uses sysroot and isysroot
That may work, but I have the feeling that the original usage for --sysroot is to let gcc now where the toolchain is installed (C library binary and headers, and kernel headers). If you set --sysroot=$(STAGING_DIR), does gcc still looks in the original toolchain place for C library headers ?
Sincerly,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers and embedded Linux development, consulting, training and support. http://free-electrons.com