Currently, --enable-static and --enable-shared are filtered by this
script. Trying to override a build system's wishes by appending
--enable-shared, resulted in the following command-line:
./configure --disable-shared --enable-shared
Due to the current behavior of the script, this causes the
build_libtool_libs variable in the generated `libtool` scripts to be
turned off, resulting in a franken-shared gcc build where shared
libraries are enabled, but none of the internal libraries (e.g. libgomp)
are built as .so files.
To test the change in behavior, one can do the following:
rm -rf tmp; mkdir tmp
cd tmp
../libgomp/configure --disable-shared --enable-shared
grep build_libtool_libs libtool | head -n1
Before this change, build_libtool_libs will be set to `no`. After this
change, it will be `yes`.
ChangeLog:
* config-ml.in: Replicate the filtering logic used with
--enable-{static,shared} for the --disable equivalents.
---
config-ml.in | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/config-ml.in b/config-ml.in
index a0f384f5c..5c7d3cfc3 100644
--- a/config-ml.in
+++ b/config-ml.in
@@ -130,7 +130,12 @@ scan_arguments ()
case $option in
--disable-*)
enableopt=`echo ${option} | sed 's:^--disable-:enable_:;s:-:_:g'`
- eval $enableopt=no
+ # disable_shared and disable_static are handled by configure.
+ # Don't undo its work.
+ case $enableopt in
+ enable_shared | enable_static) ;;
+ *) eval $enableopt=no ;;
+ esac
;;
--enable-*)
case "$option" in
--
2.51.2