From: Glenn Washburn <development@efficientek.com>
To: Daniel Kiper <dkiper@net-space.pl>, grub-devel@gnu.org
Cc: Glenn Washburn <development@efficientek.com>
Subject: [PATCH 3/5] configure: Remove dead code
Date: Fri, 18 Mar 2022 01:41:37 -0500 [thread overview]
Message-ID: <fa150b4f9971d4075d8d78e3d4415fb1aa96ea27.1647585376.git.development@efficientek.com> (raw)
In-Reply-To: <cover.1647585376.git.development@efficientek.com>
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
if 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.
Also move grub_ASM_USCORE to put with other marcos defined in aclocal.m4.
Signed-off-by: Glenn Washburn <development@efficientek.com>
---
configure.ac | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/configure.ac b/configure.ac
index 170098ec65..0e50f9577b 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)
@@ -1456,6 +1446,7 @@ fi
LIBS=""
# Defined in aclocal.m4.
+grub_ASM_USCORE
grub_PROG_TARGET_CC
if test "x$TARGET_APPLE_LINKER" != x1 ; then
grub_PROG_OBJCOPY_ABSOLUTE
--
2.27.0
next prev parent reply other threads:[~2022-03-18 6:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-18 6:41 [PATCH 0/5] Configure cleanups and a fix Glenn Washburn
2022-03-18 6:41 ` [PATCH 1/5] configure: Allow HOST_CC to override CC Glenn Washburn
2022-03-24 13:37 ` Daniel Kiper
2022-03-18 6:41 ` [PATCH 2/5] configure: Sort AM_CONDITIONALs alphabetically Glenn Washburn
2022-03-18 6:41 ` Glenn Washburn [this message]
2022-03-18 6:41 ` [PATCH 4/5] configure: Remove unused CFLAGS definitions Glenn Washburn
2022-03-18 6:41 ` [PATCH 5/5] configure: Whitespace changes to improve readability Glenn Washburn
2022-03-24 13:31 ` [PATCH 0/5] Configure cleanups and a fix Daniel Kiper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fa150b4f9971d4075d8d78e3d4415fb1aa96ea27.1647585376.git.development@efficientek.com \
--to=development@efficientek.com \
--cc=dkiper@net-space.pl \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.