From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1nV6JZ-0006U7-3H for mharc-grub-devel@gnu.org; Fri, 18 Mar 2022 02:42:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60326) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nV6JV-0006RT-Jc for grub-devel@gnu.org; Fri, 18 Mar 2022 02:42:17 -0400 Received: from [2607:f8b0:4864:20::f2a] (port=34521 helo=mail-qv1-xf2a.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nV6JU-0004o5-40 for grub-devel@gnu.org; Fri, 18 Mar 2022 02:42:17 -0400 Received: by mail-qv1-xf2a.google.com with SMTP id kd12so5906974qvb.1 for ; Thu, 17 Mar 2022 23:42:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficientek-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=V/JXQdYdOmC0nMiwTXlB1t1/5DsWFv6B9VA3GOWPMGU=; b=30df/kKbOmpsjUWAG5Rqg76PMEYZR4x2E4EptikJ8hCUnfiUAb2fmEF2yfmhF7rgwA 2BXgc6Nhpp2w8OKVb4ldlzX7WXTHPFfg59qd6q4ybXawrqoc637F3NiuvY4jLeiFIRFW l8oakmFrOdymk8DeGVEFZPKmX/bJC2WHXeooHJGTkpRJLwJRjYFrP4qFmHNI9eYBkwnM qc6kxmYZrXI8unLIFt+69jflvU8adrDQiidDMdjCvKkKAPYfHyEyzKrM54+npFcUMCoN wbpjSLJnUAur/irME1G611ssyHg2sSM7u9rUSTCVgVIUKH1LpYp23uGqfOUn5/xmo6Su CTbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=V/JXQdYdOmC0nMiwTXlB1t1/5DsWFv6B9VA3GOWPMGU=; b=XnSmHZDINFwV2U6mjxgj0bzcch5GqYihWDjk78n5eb5M+1j0MqecvNUjFLDf7UvFvb VhgKx+looAdAZU7okND9ImS9oAzLvFDcAKdJJOgEUcitlautHgx6g53KsTNAbOLD4S1A oIY8RJZ7xSGV9pXVFm1/lki8iSbzpYduUdD6Eyf4RBnM6MAdj6UMOblMeaHWjAo/tsX+ ql34hiteBWqlDdTH00kpEnw3Xnkd9eRNsorR3ZoQskP0uMxix0I/bcDvWiRuG01oTeMv DCqrXv4gsCiHeN7VX5gLkCiK35Py9E5tMAHo1WIIT2cLPtf4z+m7UNGej+n0Fl3Zq062 85KA== X-Gm-Message-State: AOAM530EryDATDFIMnZQ4LrbwrlU9pHjpcN66LxBZ/DMSrsywWlpfuhF fK2XnVJvEAHEl9GeqmDcoDfMheI5Gg87Ig== X-Google-Smtp-Source: ABdhPJy90/4K6DSJ5eIPlWTGUez9kpPaAEsGdmVoMxv0i5PvHURsRJNrzgbqYDHDfglH11PrBKbZZw== X-Received: by 2002:a05:6214:4008:b0:435:433d:4641 with SMTP id kd8-20020a056214400800b00435433d4641mr6080839qvb.38.1647585735217; Thu, 17 Mar 2022 23:42:15 -0700 (PDT) Received: from localhost.localdomain (51-15-0-88.rev.poneytelecom.eu. [51.15.0.88]) by smtp.gmail.com with ESMTPSA id y12-20020a05622a164c00b002e1e277885esm5054063qtj.8.2022.03.17.23.42.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Mar 2022 23:42:14 -0700 (PDT) From: Glenn Washburn To: Daniel Kiper , grub-devel@gnu.org Cc: Glenn Washburn Subject: [PATCH 3/5] configure: Remove dead code Date: Fri, 18 Mar 2022 01:41:37 -0500 Message-Id: X-Mailer: git-send-email 2.27.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::f2a (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::f2a; envelope-from=development@efficientek.com; helo=mail-qv1-xf2a.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Mar 2022 06:42:18 -0000 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 --- 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