1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-15 20:25:17 +03:00
aports/testing/ccl/makefile64.patch
2022-06-07 16:08:18 +00:00

28 lines
1.3 KiB
Diff

fortify-headers adds a UD2 instruction because the compiler cannot
determine the size of "spjump_start" that is used with memmove
in the remap_spjump() function of pmcl-kernel.c. Disabling this
allows CCL to run without encountering an "Illegal instruction".
Use -no-pie to suppress compiler warnings about "relocation in
read-only section `.text'" and "creating DT_TEXTREL in a PIE".
--- a/lisp-kernel/linuxx8664/Makefile
+++ b/lisp-kernel/linuxx8664/Makefile
@@ -23,7 +23,7 @@
M4FLAGS = -DLINUX -DX86 -DX8664 -DHAVE_TLS
CDEFINES = -DLINUX -D_REENTRANT -DX86 -DX8664 -D_GNU_SOURCE -DHAVE_TLS -DVC_REVISION=$(VC_REVISION) #-DDISABLE_EGC -DUSE_FUTEX
CDEBUG = -g
-COPT = -O2
+COPT = -O2 -U_FORTIFY_SOURCE
# Once in a while, -Wformat says something useful. The odds are against that,
# however.
WFORMAT = -Wno-format
@@ -74,7 +74,7 @@
USE_LINK_MAP = # -T ./elf_x86_64.x
../../lx86cl64: $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) Makefile $(LINK_MAP)
- $(CC) -m64 $(CDEBUG) -Wl,--export-dynamic $(HASH_STYLE) -o $@ $(USE_LINK_MAP) $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) -Wl,--no-as-needed $(OSLIBS)
+ $(CC) -m64 $(CDEBUG) -Wl,--export-dynamic $(HASH_STYLE) -Wl,--no-pie -o $@ $(USE_LINK_MAP) $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) -Wl,--no-as-needed $(OSLIBS)
$(SPOBJ): $(SPINC)