ocaml/0023-configure-Allow-user-defined-C-compiler-flags.patch
Richard W.M. Jones 6fbb4db452 Include more upstream patches from 4.14 branch
Don't use %configure macro because that breaks on riscv64.
https://bugzilla.redhat.com/2124272
2022-09-06 13:34:55 +01:00

28 lines
760 B
Diff

From 2501cd8b3c40188e5eb6dd2158d61cfa023236c2 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 29 May 2012 20:44:18 +0100
Subject: [PATCH 23/24] configure: Allow user defined C compiler flags.
---
configure.ac | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/configure.ac b/configure.ac
index ebb8bbdb80..9e6c0b9745 100644
--- a/configure.ac
+++ b/configure.ac
@@ -680,6 +680,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"
+
internal_cppflags="-DCAML_NAME_SPACE $internal_cppflags"
# Enable SSE2 on x86 mingw to avoid using 80-bit registers.
--
2.37.0.rc2