From 79f7c6c9f048d4bfc5ab599d040c9c1443327f3e Mon Sep 17 00:00:00 2001 From: Benjamin Kaduk Date: Sun, 22 Nov 2015 18:22:58 -0600 Subject: [PATCH] Fix optimized IRIX kernel module builds Commit 9f94892f8d996a522e7801ef6088a13769bee7c2 (from 2006) introduced per-file CFLAGS, using $(CFLAGS-$@); this construct is not parsed well by IRIX make, which ends up attempting to expand '$@)' and finding mismatched parentheses. Commit 5987e2923a2670a27a801461dc9668ec88ed7d2a (from 2007) followed, fixing the IRIX build but only for the NOOPT case. This left the problematic expression in CFLAGS_OPT until 2013, when another RT ticket was filed reporting the continued breakage. That ticket was then ignored until 2015 (now) with no particular cries of outrage on the mailing lists. Perhaps this gives some indication of the size and/or mindset of the IRIX userbase. (There have been successful IRIX installations during this time period, so presumably it was discovered that disabling optimizations helped the build along.) FIXES 131621 Reviewed-on: http://gerrit.openafs.org/12111 Tested-by: BuildBot Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Michael Meffie Reviewed-by: Benjamin Kaduk (cherry picked from commit 767694d9ec86fc9451f5a4ba2ec7405c29986a21) Change-Id: Ie5d349b1e9f8a768efcb461d7367d2d7deac31f6 Reviewed-on: https://gerrit.openafs.org/12198 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Michael Meffie Reviewed-by: Mark Vitale Reviewed-by: Stephan Wiesand --- src/libafs/Makefile.common.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libafs/Makefile.common.in b/src/libafs/Makefile.common.in index a7b65d306b..46b9c9d708 100644 --- a/src/libafs/Makefile.common.in +++ b/src/libafs/Makefile.common.in @@ -49,7 +49,7 @@ COMMON_INCLUDE = -I. -I.. -I../nfs \ .c.o: $(CC) $(COMMON_INCLUDE) $(CFLAGS) $(CFLAGS-$(@)) $(KERN_DBG) -c $< CRULE_NOOPT= $(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(CFLAGS) $(CFLAGS-$(@)) -o $@ -c $? -CRULE_OPT= $(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(KERN_OPTMZ) $(CFLAGS) $(CFLAGS-$@) -o $@ -c $? +CRULE_OPT= $(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(KERN_OPTMZ) $(CFLAGS) $(CFLAGS-$(@)) -o $@ -c $? system: all