Building on ARM and ld error


Carles Cufi
 

Hi there,

Building a simple example on Linux with the latest 0.8.2 SDK:

$ make BOARD=nrf52_pca10040

I get the following error:

/home/cacu/prog/zephyr-sdk/sysroots/i686-pokysdk-linux/usr/libexec/arm-poky-eabi/gcc/arm-poky-eabi/5.2.0/real-ld: cannot find -lgcc

Below is my zephyr.lnk contents:

-nostartfiles -nodefaultlibs -nostdlib -static -Wl,-X -Wl,-N -Wl,--gc-sections -Wl,--build-id=none
-Wl,-Map=zephyr.map
-L ./include/generated
-u _OffsetAbsSyms -u _ConfigAbsSyms
-e __start
-Wl,--start-group
-Wl,--whole-archive

src/built-in.o
libzephyr.a
-Wl,--no-whole-archive
./arch/arm/core/offsets/offsets.o
-Wl,--end-group
-L . -L ~/prog/zephyr-sdk/sysroots/armv5-poky-eabi/usr/lib/armv7e-m -lgcc


Thanks,

Carles


Kumar Gala
 

On Aug 6, 2016, at 10:28 AM, Cufi, Carles <Carles.Cufi(a)nordicsemi.no> wrote:

Hi there,

Building a simple example on Linux with the latest 0.8.2 SDK:

$ make BOARD=nrf52_pca10040

I get the following error:

/home/cacu/prog/zephyr-sdk/sysroots/i686-pokysdk-linux/usr/libexec/arm-poky-eabi/gcc/arm-poky-eabi/5.2.0/real-ld: cannot find -lgcc

Below is my zephyr.lnk contents:

-nostartfiles -nodefaultlibs -nostdlib -static -Wl,-X -Wl,-N -Wl,--gc-sections -Wl,--build-id=none
-Wl,-Map=zephyr.map
-L ./include/generated
-u _OffsetAbsSyms -u _ConfigAbsSyms
-e __start
-Wl,--start-group
-Wl,--whole-archive

src/built-in.o
libzephyr.a
-Wl,--no-whole-archive
./arch/arm/core/offsets/offsets.o
-Wl,--end-group
-L . -L ~/prog/zephyr-sdk/sysroots/armv5-poky-eabi/usr/lib/armv7e-m -lgcc


Thanks,

Carles
Any progress/luck with this?

- k


Benjamin Walsh <benjamin.walsh@...>
 

On Wed, Aug 10, 2016 at 01:31:14PM -0500, Kumar Gala wrote:

On Aug 6, 2016, at 10:28 AM, Cufi, Carles <Carles.Cufi(a)nordicsemi.no> wrote:

Hi there,

Building a simple example on Linux with the latest 0.8.2 SDK:

$ make BOARD=nrf52_pca10040

I get the following error:

/home/cacu/prog/zephyr-sdk/sysroots/i686-pokysdk-linux/usr/libexec/arm-poky-eabi/gcc/arm-poky-eabi/5.2.0/real-ld: cannot find -lgcc

Below is my zephyr.lnk contents:

-nostartfiles -nodefaultlibs -nostdlib -static -Wl,-X -Wl,-N -Wl,--gc-sections -Wl,--build-id=none
-Wl,-Map=zephyr.map
-L ./include/generated
-u _OffsetAbsSyms -u _ConfigAbsSyms
-e __start
-Wl,--start-group
-Wl,--whole-archive

src/built-in.o
libzephyr.a
-Wl,--no-whole-archive
./arch/arm/core/offsets/offsets.o
-Wl,--end-group
-L . -L ~/prog/zephyr-sdk/sysroots/armv5-poky-eabi/usr/lib/armv7e-m -lgcc


Thanks,

Carles
Any progress/luck with this?
We dicussed it on IRC: the SDK chokes if it is installed under a user's
home dir _and_ ZEPHYR_SDK_INSTALL_DIR is set to ~/path/to/sdk instead of
/home/<user>/path/to/sdk.

There should be a defect already open for this.