aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Washburn <development@efficientek.com>2022-03-18 01:41:37 -0500
committerDaniel Kiper <daniel.kiper@oracle.com>2022-04-04 19:18:58 +0200
commit4ee4d4f50bb63fb061fa9bd326e3bd1ea948d8f7 (patch)
tree72115f774cdb139482d44508dbbcaeacb63f503c
parentaffe8ba61539c342edede4a6e3090555da063a0f (diff)
downloadgrub-4ee4d4f50bb63fb061fa9bd326e3bd1ea948d8f7.tar.gz
configure: Remove dead code
It appears as though the intent of this code is to define abort() and main() symbols for some configure tests. However, it never gets used because the if is only entered when not building for *-emu, but the next if block only runs when building for *-emu. And the if block after that unconditionally resets CFLAGS. So this code can have no effect. Additionally, s/aclocal.m4/acinclude.m4/ and move grub_ASM_USCORE to put with other marcos defined in acinclude.m4. Signed-off-by: Glenn Washburn <development@efficientek.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
-rw-r--r--configure.ac13
1 files changed, 2 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index 9ff51b9cd..52ae119fb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1433,16 +1433,6 @@ CFLAGS="$TARGET_CFLAGS -nostdlib -Wno-error"
fi
CPPFLAGS="$TARGET_CPPFLAGS"
-grub_ASM_USCORE
-if test "x$TARGET_APPLE_LINKER" = x0 && test x"$platform" != xemu; then
-if test x$grub_cv_asm_uscore = xyes; then
-DEFSYM="-Wl,--defsym,_abort=_main -Wl,--defsym,__main=_main"
-else
-DEFSYM="-Wl,--defsym,abort=main -Wl,--defsym,_main=main -Wl,--defsym,__main=main"
-fi
-CFLAGS="$TARGET_CFLAGS -nostdlib $DEFSYM"
-fi
-
# Check for libgcc symbols
if test x"$platform" = xemu; then
AC_CHECK_FUNCS(__udivsi3 __umodsi3 __divsi3 __modsi3 __divdi3 __moddi3 __udivdi3 __umoddi3 __ctzdi2 __ctzsi2 __clzdi2 __aeabi_uidiv __aeabi_uidivmod __aeabi_idiv __aeabi_idivmod __aeabi_ulcmp __muldi3 __aeabi_lmul __aeabi_memcpy __aeabi_memcpy4 __aeabi_memcpy8 __aeabi_memclr __aeabi_memclr4 __aeabi_memclr8 __aeabi_memset __aeabi_lasr __aeabi_llsl __aeabi_llsr _restgpr_14_x __ucmpdi2 __ashldi3 __ashrdi3 __lshrdi3 __bswapsi2 __bswapdi2 __bzero __register_frame_info __deregister_frame_info ___chkstk_ms __chkstk_ms)
@@ -1455,7 +1445,8 @@ CFLAGS="$TARGET_CFLAGS -nostdlib"
fi
LIBS=""
-# Defined in aclocal.m4.
+# Defined in acinclude.m4.
+grub_ASM_USCORE
grub_PROG_TARGET_CC
if test "x$TARGET_APPLE_LINKER" != x1 ; then
grub_PROG_OBJCOPY_ABSOLUTE