[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] master e622c3c4c 1/2: Improve the build rule for `apinames`.
From: |
Werner Lemberg |
Subject: |
[freetype2] master e622c3c4c 1/2: Improve the build rule for `apinames`. |
Date: |
Thu, 5 Sep 2024 18:39:29 -0400 (EDT) |
branch: master
commit e622c3c4cdbfd9549393a0f5866f6d5a3e67dd0a
Author: suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
Commit: suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
Improve the build rule for `apinames`.
* builds/unix/configure.raw: copy `CFLAGS` &
`LDFLAGS` values to `CFLAGS_BUILD` &
`LDFLAGS_BUILD`, in a self-hosting case.
* builds/unix/unix-cc.in: set `CCexe_CFLAGS` &
`CCexe_LDFLAGS` by `CFLAGS_BUILD` &
`LDFLAGS_BUILD`.
In some confused environments, simple building
like `cc -o apinames apinames.c` is no longer
able to build an executable running on the host.
The validity of `CC` is tested with consideration
of `CFLAGS` and `LDFLAGS`, thus, duplicating
`CFLAGS` & `LDFLAGS` to `CCexe_CFLAGS` &
`CCexe_LDFLAGS` (via XXX_BUILD) would be slightly
safer in a self-hosting build.
Fixes the issue #1296.
---
builds/unix/configure.raw | 6 ++++++
builds/unix/unix-cc.in | 4 +++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/builds/unix/configure.raw b/builds/unix/configure.raw
index 7a795cbc0..0aa5e6558 100644
--- a/builds/unix/configure.raw
+++ b/builds/unix/configure.raw
@@ -62,12 +62,18 @@ if test ${cross_compiling} = yes; then
fi
rm -f a.* b.* a_out.exe conftest.*
AC_MSG_RESULT($EXEEXT_BUILD)
+ CFLAGS_BUILD=
+ LDFLAGS_BUILD=
else
CC_BUILD=${CC}
+ CFLAGS_BUILD=${CFLAGS}
+ LDFLAGS_BUILD=${LDFLAGS}
EXEEXT_BUILD=${EXEEXT}
fi
AC_SUBST(CC_BUILD)
+AC_SUBST(CFLAGS_BUILD)
+AC_SUBST(LDFLAGS_BUILD)
AC_SUBST(EXEEXT_BUILD)
diff --git a/builds/unix/unix-cc.in b/builds/unix/unix-cc.in
index aafad2f97..9e329d23f 100644
--- a/builds/unix/unix-cc.in
+++ b/builds/unix/unix-cc.in
@@ -113,7 +113,9 @@ LDFLAGS := @LDFLAGS@
CCraw_build := @CC_BUILD@ # native CC of building system
E_BUILD := @EXEEXT_BUILD@ # extension for executable on building system
EXPORTS_LIST := $(OBJ_DIR)/ftexport.sym
-CCexe := $(CCraw_build) # used to compile `apinames' only
+CCexe := $(CCraw_build) # used to compile `apinames' only, see
exports.mk
+CCexe_CFLAGS := @CFLAGS_BUILD@ # ditto.
+CCexe_LDFLAGS := @LDFLAGS_BUILD@ # ditto.
# Library linking.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] master e622c3c4c 1/2: Improve the build rule for `apinames`.,
Werner Lemberg <=