From: "Дилян Палаузов" <dilyan.palauzov@aegee.org>
To: git@vger.kernel.org
Subject: Building git with /bin/sh⇔dash produces suboptimal GIT-CFLAGS file
Date: Thu, 28 Nov 2024 14:53:21 +0100 [thread overview]
Message-ID: <b4ef94b2a0294c338d115fee68e0c31e44dad3b9.camel@aegee.org> (raw)
Hello,
when /bin/sh is bash, target GIT-CFLAGS: FORCE in Makefile puts in the file GIT-CFLAGS the content
gcc: -g -O2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"x86_64\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -I/usr/local/include -DUSE_CURL_FOR_IMAP_SEND -DSUPPORTS_SIMPLE_IPC -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"git-compat-util.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_STRINGS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_SYNC_FILE_RANGE -DHAVE_GETDELIM '-
DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DSHELL_PATH='"/bin/sh"':
when /bin/sh is dash (b3e38ad), the same file GIT-CFLAGS contains
gcc: -g -O2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU=""x86_64"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -I/usr/local/include -DUSE_CURL_FOR_IMAP_SEND -DSUPPORTS_SIMPLE_IPC -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C=""git-compat-util.h"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C=""git-compat-util.h"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_STRINGS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_SYNC_FILE_RANGE -DHAVE_GETDELIM '-
DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DSHELL_PATH='"/bin/sh"':
Note the differences in the -DGIT_HOST_CPU, -DSHA1DC_CUSTOM_INCLUDE_SHA1_C values. Because of the differences, in Makefile:3150 if test x"$$FLAGS" != x"`cat GIT-CFLAGS 2>/dev/null`" ; then always succeeds, prints “* new build flags” and every run of make starts rebuilding daemon.o. So the empty build is not empty.
Greetings
Дилян
next reply other threads:[~2024-11-28 13:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-28 13:53 Дилян Палаузов [this message]
2024-11-28 17:25 ` Building git with /bin/sh⇔dash produces suboptimal GIT-CFLAGS file brian m. carlson
2024-11-28 18:52 ` Дилян Палаузов
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=b4ef94b2a0294c338d115fee68e0c31e44dad3b9.camel@aegee.org \
--to=dilyan.palauzov@aegee.org \
--cc=git@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).