[Scummvm-git-logs] scummvm master -> 6041d7e455e847832c484e2ed9e5138109ff6e31
bluegr
noreply at scummvm.org
Tue Dec 3 05:46:27 UTC 2024
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
0979284958 CONFIGURE: Add -ffat-lto-objects to the endianness check for LTO builds
6041d7e455 CONFIGURE: Remove tmp_endianness_check.dwo leftover
Commit: 0979284958e60c13c2323115694c99c40c2af9bd
https://github.com/scummvm/scummvm/commit/0979284958e60c13c2323115694c99c40c2af9bd
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2024-12-03T07:46:23+02:00
Commit Message:
CONFIGURE: Add -ffat-lto-objects to the endianness check for LTO builds
Some Linux distributions enable compiler Link Time Optimization by default,
but our endianness check may fail there, if the object that is created only
contains Intermediate Representation and no regular Machine Code, especially
as not all 'strings' utilities are guaranteed to understand IR-only objects.
The -ffat-lto-objects flag (added in GCC 4.7) makes sure that this object
will always contain regular machine code, even when LTO is turned on.
>From Fedora.
Changed paths:
configure
diff --git a/configure b/configure
index 24702a05d6d..8889c46db19 100755
--- a/configure
+++ b/configure
@@ -2641,7 +2641,10 @@ __attribute__ ((used)) unsigned short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x
const char * _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; return s; }
int main() { _ascii (); _ebcdic (); return 0; }
EOF
-$CXX $LDFLAGS $CXXFLAGS -o $TMPO$HOSTEXEEXT tmp_endianness_check.cpp >> "$TMPLOG" 2>&1
+# Make sure that this particular object always has regular machine code content,
+# so that the checks below can be done, even with LTO on.
+test "$have_gcc" = yes && no_lto_regular_machine_code_removal=-ffat-lto-objects
+$CXX $LDFLAGS $CXXFLAGS $no_lto_regular_machine_code_removal -o $TMPO$HOSTEXEEXT tmp_endianness_check.cpp >> "$TMPLOG" 2>&1
if $_strings $TMPO$HOSTEXEEXT 2>> "$TMPLOG"| grep BIGenDianSyS >/dev/null; then
_endian=big
elif $_strings $TMPO$HOSTEXEEXT 2>> "$TMPLOG" | grep LiTTleEnDian >/dev/null; then
Commit: 6041d7e455e847832c484e2ed9e5138109ff6e31
https://github.com/scummvm/scummvm/commit/6041d7e455e847832c484e2ed9e5138109ff6e31
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2024-12-03T07:46:23+02:00
Commit Message:
CONFIGURE: Remove tmp_endianness_check.dwo leftover
Seen with GCC 5.5.0.
Changed paths:
configure
diff --git a/configure b/configure
index 8889c46db19..8477e9490d2 100755
--- a/configure
+++ b/configure
@@ -2650,8 +2650,8 @@ if $_strings $TMPO$HOSTEXEEXT 2>> "$TMPLOG"| grep BIGenDianSyS >/dev/null; then
elif $_strings $TMPO$HOSTEXEEXT 2>> "$TMPLOG" | grep LiTTleEnDian >/dev/null; then
_endian=little
fi
-echo $_endian;
-cc_check_clean tmp_endianness_check.cpp $TMPO-tmp_endianness_check.dwo
+echo $_endian
+cc_check_clean tmp_endianness_check.cpp $TMPO-tmp_endianness_check.dwo tmp_endianness_check.dwo
case $_endian in
big)
More information about the Scummvm-git-logs
mailing list