Hello Neeraj,
On 14.02.2024 13:02, Neeraj Chaudhary wrote:
LD board/compal_e88/hello_world.highram.elf
arm-none-eabi-ld: Error: unable to disambiguate: -nostartfiles (did you
mean --nostartfiles ?)
make[1]: *** [Makefile.inc:138: board/compal_e88/hello_world.highram.elf]
Error 1
make[1]: Leaving directory '/home/nokia-lab3/osmocom-bb/src/target/firmware'
make: *** [Makefile:100: firmware] Error 2
interestingly enough, this is exactly the error that the commit I
suggested to revert is supposed to fix. I was getting this error with
arm-none-eabi-gcc v13.2.0 and that commit fixed the problem for me.
As a temporary workaround, in addition to having the Harald's commit
reverted, I suggest applying this patch:
--- a/src/target/firmware/Makefile.inc
+++ b/src/target/firmware/Makefile.inc
@@ -22,7 +22,7 @@ CFLAGS += -g$(DEBUGF)
#ASFLAGS=--g$(DEBUGF) $(INCLUDES) -D__ASSEMBLY__
ASFLAGS=$(INCLUDES) -D__ASSEMBLY__
-LDFLAGS = -nostartfiles -nostdlib -nodefaultlibs --gc-sections --cref
+LDFLAGS = -nostdlib -z nodefaultlib --gc-sections --cref
#### QUIET OUTPUT ####
This is how I used to workaround the problem when building locally,
before the Harald's patch was merged.
Also you mentioned that people are getting this error
while using the old
"arm-elf-*" Toolchain, May you please guide me on where I can get the new
Toolchain ? So I do need to make these reverts .
It appears like you're already using a more or less recent toolchain.
But we would need to know the version, of course ;)
I thought were using arm-none-eabi-gcc v4.8.2.
Currently I am following the OSMOCOM Guide and
installing the toolchain as
mentioned below .
sudo apt install gcc-arm-none-eabi
Please tell us the exact version(s) of the toolchain components:
$ dpkg -l | grep arm-none-eabi
And what kind of linux distribution you're using (Debian? Ubuntu?).
I just gave it a try in docker, using debian:bookworm image:
root@a2fb7cb6978c:/osmocom-bb/src# dpkg -l | grep arm-none-eabi
ii binutils-arm-none-eabi 2.40-2+18+b1 amd64
ii gcc-arm-none-eabi 15:12.2.rel1-1 amd64
ii libnewlib-arm-none-eabi 3.3.0-1.3 all
ii libstdc++-arm-none-eabi-dev 15:12.2.rel1-1+23 all
ii libstdc++-arm-none-eabi-newlib 15:12.2.rel1-1+23 all
And could successfully build the firmware without having to revert anything.
--
Best regards,
Vadim.