apache / apache/nuttx

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

Open
#9,832 0 comments 0 reactions 0 assignees View on GitHub
Area: Build system Type: Bug Type: Regression
Dominant language
C
Stars
4k
Forks
1.7k
Avg merge
1d 17h
Merged PRs (30d)
237

Description

$ 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.