[klibc] [patch] Kbuild don't hardcode gcc and binutils version

Sam Ravnborg sam at ravnborg.org
Wed Apr 5 14:13:59 PDT 2006


On Wed, Apr 05, 2006 at 10:45:51PM +0200, maximilian attems wrote:
[Received a forward of this mail and I had deleted the original one.
So your reply-chain is broken].
> 
> sparc still needed to build with gcc-3.3
> belows makes use of the exported CC variable.
> 
> also export the binutils for consistency,
> added the missing ones too for klcc.
> 
> 
> diff --git a/Makefile b/Makefile
> index bfae8de..640eec4 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -19,6 +19,11 @@ export ARCH := $(shell uname -m | sed -e
>  export HOSTCC     := gcc
>  export HOSTCFLAGS := -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
>  export PERL       := perl
> +export LD         := ld
> +export AR         := ar
> +export RANLIB     := ranlib
> +export STRIP      := strip
> +export NM         := nm
This will clash with the namespace used by the kernel.
A better fix would be to prefix all variables with KLIBC
and then...

> --- a/scripts/Kbuild.klibc
> +++ b/scripts/Kbuild.klibc
> +KLIBCLD          := $(KLIBCROSS)$(LD)
KLIBCLD          := $(KLIBCROSS)$(KLIBCLD)
use the variable with KLIBC prefixed in the statement above.

	Sam



More information about the klibc mailing list