nuttx icon indicating copy to clipboard operation
nuttx copied to clipboard

Cygwin GNU make link broken, ld: unrecognized option '-z'

Open patacongo opened this issue 2 years ago • 0 comments

$ tools/configure.sh sim:nsh $ make V=1

...
echo "LD:  nuttx.exe"
LD:  nuttx.exe
ld -r -z noexecstack -L"/cygdrive/d/Spuda/Documents/projects/nuttx/master/nuttx/staging" -L board   \
     -o nuttx.rel sim_head.o sim_doirq.o --start-group -lsched -ldrivers -lboards -lc -lmm -larch -lapps -lfs -lbinfmt -lboard  --end-group
ld: unrecognized option '-z'
ld: use the --help option for usage information
make[1]: *** [Makefile:362: nuttx.exe] Error 1
make[1]: Leaving directory '/cygdrive/d/Spuda/Documents/projects/nuttx/master/nuttx/arch/sim/src'
make: *** [tools/Unix.mk:527: nuttx.exe] Error 2

$ ld --version
GNU ld (GNU Binutils) 2.40

Per https://stackoverflow.com/questions/55418931/ld-exe-unrecognized-option-z

The -z options are just not supported for Windows versions of ld. Check with ld --help. For Cygwin, it should not list -z options that are present when running the same command on a Linux system. I believe this is because options here are really only meaningful on Linux.

patacongo avatar Jul 14 '23 14:07 patacongo