generated from ossf/project-template
-
Notifications
You must be signed in to change notification settings - Fork 183
Closed
Description
In the compiler option hardening materials, running the new "make" test on clang on MacOS causes failures with clang:
make
cc -O2 -Wall -Wformat=2 -Wconversion -Wtrampolines -Wimplicit-fallthrough -D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS -fstack-clash-protection -fstack-protector-strong -Wl,-z,nodlopen -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -fPIE -pie -fPIC -shared demo.c -o demo
clang: warning: argument unused during compilation: '-fstack-clash-protection' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument]
warning: unknown warning option '-Wtrampolines' [-Wunknown-warning-option]
1 warning generated.
ld: unknown option: -z
The -pie problem is known, and resolved by using -fpie. But -Wtrampolines and -fstack-clash-protection are not universal.