bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

5.0: CPPFLAGS doesn't propagate to loadables


From: Christian Weisgerber
Subject: 5.0: CPPFLAGS doesn't propagate to loadables
Date: Tue, 12 Feb 2019 23:13:21 +0100
User-agent: Mutt/1.11.2 (2019-01-07)

There is a small omission in bash 5.0's build infrastructure:
The CPPFLAGS variable doesn't propagate to the actual compiler flags
used to build the loadables.  In practice, this means that the seq
loadable will fail to build on operating systems that have libintl
outside the default paths (e.g. OpenBSD with GNU gettext in /usr/local):

cc -fPIC -DHAVE_CONFIG_H -DSHELL -DDEV_FD_STAT_BROKEN -O2 -pipe 
-Wno-parentheses -Wno-format-security -I. -I.. -I../.. -I../../lib 
-I../../builtins -I.  -I../../include -I/usr/obj/bash-5.0.2/bash-5.0 
-I/usr/obj/bash-5.0.2/bash-5.0/lib  -I/usr/obj/bash-5.0.2/bash-5.0/builtins  -c 
-o seq.o seq.c
In file included from seq.c:32:
In file included from ../../bashintl.h:30:
../../include/gettext.h:27:11: fatal error: 'libintl.h' file not found
# include <libintl.h>
          ^~~~~~~~~~~
1 error generated.

Trivial fix:

Index: examples/loadables/Makefile.in
--- examples/loadables/Makefile.in.orig
+++ examples/loadables/Makefile.in
@@ -76,7 +76,7 @@ INTL_BUILDDIR = ${LIBBUILD}/intl
 INTL_INC = @INTL_INC@
 LIBINTL_H = @LIBINTL_H@
 
-CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(LOCAL_CFLAGS) $(CFLAGS)
+CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(LOCAL_CFLAGS) $(CPPFLAGS) $(CFLAGS)
 
 #
 # These values are generated for configure by ${topdir}/support/shobj-conf.

-- 
Christian "naddy" Weisgerber                          naddy@mips.inka.de



reply via email to

[Prev in Thread] Current Thread [Next in Thread]