2023-10-05 08:58:44 +00:00
|
|
|
From e8170e71efb93f10c27935acc95093eb3f53ab6c Mon Sep 17 00:00:00 2001
|
2023-10-05 02:56:33 +00:00
|
|
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
|
|
Date: Tue, 29 May 2012 20:44:18 +0100
|
2023-10-05 08:58:44 +00:00
|
|
|
Subject: [PATCH 3/5] configure: Allow user defined C compiler flags.
|
2023-10-05 02:56:33 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
configure.ac | 8 ++++++--
|
|
|
|
1 file changed, 6 insertions(+), 2 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
2023-10-05 08:58:44 +00:00
|
|
|
index 6c50ba6c71..db6ea8a8d1 100644
|
2023-10-05 02:56:33 +00:00
|
|
|
--- a/configure.ac
|
|
|
|
+++ b/configure.ac
|
|
|
|
@@ -759,6 +759,10 @@ AS_CASE([$host],
|
|
|
|
internal_cflags="$cc_warnings"],
|
|
|
|
[common_cflags="-O"])])
|
|
|
|
|
|
|
|
+# Allow CFLAGS and LDFLAGS to be added.
|
|
|
|
+common_cflags="$common_cflags $CFLAGS"
|
|
|
|
+cclibs="$cclibs $LDFLAGS"
|
|
|
|
+
|
|
|
|
# Enable SSE2 on x86 mingw to avoid using 80-bit registers.
|
|
|
|
AS_CASE([$host],
|
|
|
|
[i686-*-mingw32*],
|
|
|
|
@@ -2325,7 +2329,7 @@ AC_CONFIG_COMMANDS_PRE([
|
|
|
|
[mkexedebugflag="${mkexe_ldflags_prefix}${mkexedebugflag}"])
|
|
|
|
mkdll_ldflags=""
|
|
|
|
AS_IF([test -n "${LDFLAGS}"],
|
|
|
|
- [for flag in ${LDFLAGS}; do
|
|
|
|
+ [for flag in "${LDFLAGS}"; do
|
|
|
|
mkdll_ldflags="${mkdll_ldflags} ${mkexe_ldflags_prefix}${flag}"
|
|
|
|
done
|
|
|
|
mkdll_ldflags_exp="$mkdll_ldflags"])
|
|
|
|
@@ -2351,7 +2355,7 @@ ${mkdll_ldflags}"
|
|
|
|
],[
|
|
|
|
mkdll_ldflags='$(OC_DLL_LDFLAGS) $(LDFLAGS)'
|
|
|
|
mkdll_ldflags_exp="${oc_dll_ldflags}"
|
|
|
|
- AS_IF([test -n ${LDFLAGS}],
|
|
|
|
+ AS_IF([test -n "${LDFLAGS}"],
|
|
|
|
[mkdll_ldflags_exp="$mkdll_ldflags_exp $LDFLAGS"])
|
|
|
|
mkexe_ldflags="\$(OC_LDFLAGS) \$(LDFLAGS)"
|
|
|
|
mkexe_ldflags_exp="${oc_ldflags} ${LDFLAGS}"
|
|
|
|
--
|
|
|
|
2.41.0
|
|
|
|
|