aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2022-12-16 14:36:43 +0000
committerPeter Maydell <peter.maydell@linaro.org>2022-12-16 14:36:43 +0000
commitdfe504de614191eedd712a4dea0eccbf737b64c3 (patch)
tree6cee490417aa9946ddf54d05b7b41d6f90e29bbe
parentd407570557649d5f66f425ee3fa53f9c9331250f (diff)
Makefile: Force non-PIC codegenHEADmaster
The Ubuntu arm-linux-gnueabihf-gcc now defaults to generating PIC code. This breaks our test executables because it means the code wants to indirect through a GOT and we don't set that up. There's no point in producing position-independent code for baremetal binaries anyway, so just explicitly disable it with -fno-pic. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 3b408a2..938115f 100644
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,7 @@ endif
DEBUG=-g
-CFLAGS=-mcpu=cortex-m3 -mthumb -ffreestanding -nostdlib -nostartfiles -nodefaultlibs $(DEBUG) -Wall -Wextra -Werror -Wl,--build-id=none
+CFLAGS=-mcpu=cortex-m3 -mthumb -ffreestanding -nostdlib -nostartfiles -nodefaultlibs $(DEBUG) -Wall -Wextra -Werror -Wl,--build-id=none -fno-pic
LDFLAGS=-static
CFLAGS+=-Os