Skip to content

Commit

Permalink
fix undefined reference to __getauxval
Browse files Browse the repository at this point in the history
Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
  • Loading branch information
thehajime committed Jul 10, 2024
1 parent ef41643 commit 49f4cda
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ case ${TARGET} in
*-linux*)
OS=linux
export HOST_CFLAGS="-fcommon"
EXTRA_CFLAGS+=" -fcommon"
EXTRA_CFLAGS="${EXTRA_CFLAGS} -fcommon"
if [ ${TARGET} = "aarch64-linux-gnu" ] ; then
EXTRA_CFLAGS="${EXTRA_CFLAGS} -mno-outline-atomics"
fi
;;
*-netbsd*)
OS=netbsd
Expand Down
14 changes: 14 additions & 0 deletions patches/aarch64.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Submodule linux contains modified content
diff --git a/linux/arch/lkl/Makefile b/linux/arch/lkl/Makefile
index 5236ac6cf5e1..dabd02ee2b44 100644
--- a/linux/arch/lkl/Makefile
+++ b/linux/arch/lkl/Makefile
@@ -8,6 +8,8 @@ KBUILD_CFLAGS += -fPIC
ifeq ($(OUTPUT_FORMAT),mach-o-x86-64)
# workaround for Mach-O section name
LINUXINCLUDE := -I $(srctree)/arch/lkl/include/mach $(LINUXINCLUDE)
+else ifeq ($(OUTPUT_FORMAT),elf64-littleaarch64)
+KBUILD_CFLAGS += -mno-outline-atomics
endif
else ifneq (,$(filter $(OUTPUT_FORMAT),pe-i386 pe-x86-64 ))
ifneq ($(OUTPUT_FORMAT),pe-x86-64)

0 comments on commit 49f4cda

Please sign in to comment.