[Buildroot] [PATCH v2 4/7] arch: toolchain: Introduce binary format FLAT types.

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Sat Apr 13 14:31:26 UTC 2013


Dear Sonic Zhang,

On Fri, 12 Apr 2013 11:39:41 +0800, Sonic Zhang wrote:

> Just figure out the compiling flags for BINFMT_FLAT_SHARED and
> BINFMT_FLAT_SEP can't be put into the toolchain wrapper, because these
> flags are for application only, they can't be used to build Linux
> kernel.
> 
> -mid-shared-library -mshared-library-id=0
> -msep-data
> 
> So, I have to move them back to file package/Makefile.in .

Hum, that is not really nice, because the idea of the external
toolchain wrapper is to ensure that when the user will use
output/host/usr/bin/<arch>-gcc, he will get binaries that are built for
the same architecture/flags than the binaries built by Buildroot.
That's more or less the whole idea of the external toolchain wrapper
thing.

One option is to have something like:

ifeq ($(BR2_bfin),y)
LINUX_MAKE_FLAGS =
	KBUILD_CFLAGS = "$(TARGET_CFLAGS) -mno-id-shared-library ..."
endif

Not sure exactly if that's the right solution or not. Peter, you're the
one who did the external toolchain wrapper originally. Could you
comment on this specific issue?

Thanks!

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com


More information about the buildroot mailing list