[U-Boot-Users] Compile error: option `-g' is ambiguous

I just pulled the latest tree and tried building for MPC8349EMDS, I got this:
make -C examples all make[1]: Entering directory `/temp/u-boot.i2c/examples' powerpc-unknown-linux-gnu-gcc -g -Os -fPIC -ffixed-r14 -meabi -D__KERNEL__ -DTEXT_BASE=0xFE000000 -I/temp/u-boot.i2c/include -fno-builtin -ffreestanding -nostdinc -isystem /_TOOLS_/.dist0/gnu-gcc-3.4.3-binutils-2.15-powerpc-unknown-linux-gnu/i686-pc-linux2.4/bin/../lib/gcc/powerpc-unknown-linux-gnu/3.4.3/include -pipe -DCONFIG_PPC -D__powerpc__ -DCONFIG_MPC83XX -DCONFIG_E300 -ffixed-r2 -ffixed-r29 -msoft-float -Wall -Wstrict-prototypes -c -o hello_world.o hello_world.c powerpc-unknown-linux-gnu-gcc -g -Os -fPIC -ffixed-r14 -meabi -D__KERNEL__ -DTEXT_BASE=0xFE000000 -I/temp/u-boot.i2c/include -fno-builtin -ffreestanding -nostdinc -isystem /_TOOLS_/.dist0/gnu-gcc-3.4.3-binutils-2.15-powerpc-unknown-linux-gnu/i686-pc-linux2.4/bin/../lib/gcc/powerpc-unknown-linux-gnu/3.4.3/include -pipe -DCONFIG_PPC -D__powerpc__ -DCONFIG_MPC83XX -DCONFIG_E300 -ffixed-r2 -ffixed-r29 -msoft-float -Wall -Wstrict-prototypes -c -o sched.o sched.c powerpc-unknown-linux-gnu-gcc -Wa,-g -D__ASSEMBLY__ -g -Os -fPIC -ffixed-r14 -meabi -D__KERNEL__ -DTEXT_BASE=0xFE000000 -I/temp/u-boot.i2c/include -fno-builtin -ffreestanding -nostdinc -isystem /_TOOLS_/.dist0/gnu-gcc-3.4.3-binutils-2.15-powerpc-unknown-linux-gnu/i686-pc-linux2.4/bin/../lib/gcc/powerpc-unknown-linux-gnu/3.4.3/include -pipe -DCONFIG_PPC -D__powerpc__ -DCONFIG_MPC83XX -DCONFIG_E300 -ffixed-r2 -ffixed-r29 -msoft-float -c -o ppc_longjmp.o ppc_longjmp.S /_TOOLS_/.dist0/gnu-gcc-3.4.3-binutils-2.15-powerpc-unknown-linux-gnu/i686-pc-linux2.4/bin/../lib/gcc/powerpc-unknown-linux-gnu/3.4.3/../../../../powerpc-unknown-linux-gnu/bin/as: option `-g' is ambiguous make[1]: *** [ppc_longjmp.o] Error 2 make[1]: Leaving directory `/temp/u-boot.i2c/examples' make: *** [examples] Error 2
Unfortunately, I wasn't paying much attention to the recent -g discussion, but it looks like whatever changes were made breaks the 8349EMDS.

I think that your version of gas doesn't support the -g option without specifing the debugging info format.
Bye Michael
Timur Tabi wrote:
I just pulled the latest tree and tried building for MPC8349EMDS, I got this:
make -C examples all make[1]: Entering directory `/temp/u-boot.i2c/examples' powerpc-unknown-linux-gnu-gcc -g -Os -fPIC -ffixed-r14 -meabi -D__KERNEL__ -DTEXT_BASE=0xFE000000 -I/temp/u-boot.i2c/include -fno-builtin -ffreestanding -nostdinc -isystem /_TOOLS_/.dist0/gnu-gcc-3.4.3-binutils-2.15-powerpc-unknown-linux-gnu/i686-pc-linux2.4/bin/../lib/gcc/powerpc-unknown-linux-gnu/3.4.3/include -pipe -DCONFIG_PPC -D__powerpc__ -DCONFIG_MPC83XX -DCONFIG_E300 -ffixed-r2 -ffixed-r29 -msoft-float -Wall -Wstrict-prototypes -c -o hello_world.o hello_world.c powerpc-unknown-linux-gnu-gcc -g -Os -fPIC -ffixed-r14 -meabi -D__KERNEL__ -DTEXT_BASE=0xFE000000 -I/temp/u-boot.i2c/include -fno-builtin -ffreestanding -nostdinc -isystem /_TOOLS_/.dist0/gnu-gcc-3.4.3-binutils-2.15-powerpc-unknown-linux-gnu/i686-pc-linux2.4/bin/../lib/gcc/powerpc-unknown-linux-gnu/3.4.3/include -pipe -DCONFIG_PPC -D__powerpc__ -DCONFIG_MPC83XX -DCONFIG_E300 -ffixed-r2 -ffixed-r29 -msoft-float -Wall -Wstrict-prototypes -c -o sched.o sched.c powerpc-unknown-linux-gnu-gcc -Wa,-g -D__ASSEMBLY__ -g -Os -fPIC -ffixed-r14 -meabi -D__KERNEL__ -DTEXT_BASE=0xFE000000 -I/temp/u-boot.i2c/include -fno-builtin -ffreestanding -nostdinc -isystem /_TOOLS_/.dist0/gnu-gcc-3.4.3-binutils-2.15-powerpc-unknown-linux-gnu/i686-pc-linux2.4/bin/../lib/gcc/powerpc-unknown-linux-gnu/3.4.3/include -pipe -DCONFIG_PPC -D__powerpc__ -DCONFIG_MPC83XX -DCONFIG_E300 -ffixed-r2 -ffixed-r29 -msoft-float -c -o ppc_longjmp.o ppc_longjmp.S /_TOOLS_/.dist0/gnu-gcc-3.4.3-binutils-2.15-powerpc-unknown-linux-gnu/i686-pc-linux2.4/bin/../lib/gcc/powerpc-unknown-linux-gnu/3.4.3/../../../../powerpc-unknown-linux-gnu/bin/as: option `-g' is ambiguous make[1]: *** [ppc_longjmp.o] Error 2 make[1]: Leaving directory `/temp/u-boot.i2c/examples' make: *** [examples] Error 2
Unfortunately, I wasn't paying much attention to the recent -g discussion, but it looks like whatever changes were made breaks the 8349EMDS.

Michael Trimarchi wrote:
I think that your version of gas doesn't support the -g option without specifing the debugging info format.
I'm running 2.15. The latest is 2.17. The changelog for 2.16 says this:
* Add a -g command line option to generate debug information in the target's preferred debug format.
I don't think U-Boot should require gas 2.16 or higher. Is this going to be a requirement? Updating our toolset is a real pain, and I'd rather fix the Makefile instead.

In message 454107EE.7080209@freescale.com you wrote:
I don't think U-Boot should require gas 2.16 or higher. Is this going to be a requirement? Updating our toolset is a real pain, and I'd rather fix the Makefile instead.
We all agre that we don't want to require only the latest and greatest toolchains. I still couldn't make up my mind what the best way to fix the problem is. Please allow me for a little thinking...
Best regards,
Wolfgang Denk

Wolfgang Denk wrote:
In message 454107EE.7080209@freescale.com you wrote:
I don't think U-Boot should require gas 2.16 or higher. Is this going to be a requirement? Updating our toolset is a real pain, and I'd rather fix the Makefile instead.
We all agre that we don't want to require only the latest and greatest toolchains. I still couldn't make up my mind what the best way to fix the problem is. Please allow me for a little thinking...
Sure. But in the meantime, can you tell me where the -g option is specified? I'm looking through all the Makefiles and the git log, and I just can't find it.

In message 45410D06.7010801@freescale.com you wrote:
Sure. But in the meantime, can you tell me where the -g option is specified? I'm looking through all the Makefiles and the git log, and I just can't find it.
See config.mk
Best regards,
Wolfgang Denk

In message 4541058F.5050301@gandalf.sssup.it you wrote:
I think that your version of gas doesn't support the -g option without specifing the debugging info format.
Resp. his version of GCC driver does not pass the correct options to as.
BTW: please don't top-post/full quote. See http://www.netmeister.org/news/learn2quote.html
Best regards,
Wolfgang Denk

Wolfgang Denk wrote:
In message 4541058F.5050301@gandalf.sssup.it you wrote:
I think that your version of gas doesn't support the -g option without specifing the debugging info format.
Resp. his version of GCC driver does not pass the correct options to as.
powerpc-unknown-linux-gnu-gcc -Wa,-g -D__ASSEMBLY__ -g -Os -fPIC -ffixed-r14 -meabi -D__KERNEL__ -DTEXT_BASE=0xFE000000 -I/temp/u-boot.i2c/include -fno-builtin -ffreestanding -nostdinc -isystem
It seems a problem with the -Wa,-g
BTW: please don't top-post/full quote. See http://www.netmeister.org/news/learn2quote.html
I'll do Thanks
Best regards,
Wolfgang Denk
Regards, Michael
participants (3)
-
Michael Trimarchi
-
Timur Tabi
-
Wolfgang Denk