Skip to content
Snippets Groups Projects
Commit 55eb769a authored by Pietro Fezzardi's avatar Pietro Fezzardi Committed by Alessandro Di Federico
Browse files

Add `-no-pie` to compiler flags

Add this flag to the flags used for Runtime tests and to the flags used
in the translate script.

Recent GCC versions (`gcc-7` and later) enable PIE by default, and
`-fno-pie` apparently is not enough to disable it.
parent 9824a1b6
No related branches found
No related tags found
No related merge requests found
......@@ -89,7 +89,7 @@ foreach(ARCH ${SUPPORTED_ARCHITECTURES})
# Compose the command line to link support.c and the translated binaries
string(REPLACE "-" "_" NORMALIZED_ARCH "${ARCH}")
compile_executable("$(${CMAKE_BINARY_DIR}/li-csv-to-ld-options ${BINARY}.ll.li.csv) ${BINARY}${CMAKE_C_OUTPUT_EXTENSION} ${CMAKE_BINARY_DIR}/support.c -DTARGET_${NORMALIZED_ARCH} -lz -lm -lrt -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast -g -fno-pie"
compile_executable("$(${CMAKE_BINARY_DIR}/li-csv-to-ld-options ${BINARY}.ll.li.csv) ${BINARY}${CMAKE_C_OUTPUT_EXTENSION} ${CMAKE_BINARY_DIR}/support.c -DTARGET_${NORMALIZED_ARCH} -lz -lm -lrt -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast -g -fno-pie -no-pie"
"${BINARY}.translated"
COMPILE_TRANSLATED)
......
......@@ -130,4 +130,4 @@ fi
"$OBJ" \
-lz -lm -lrt \
-o "$OUTPUT" \
-fno-pie
-fno-pie -no-pie
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment