From 6c3184820aa1052016d92f7ff0419b8085d8ad14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Fri, 13 Oct 2017 15:15:06 -0600 Subject: [PATCH] Use cflags instead of the args variable (#5756) That way the user can still append things to CFLAGS. --- var/spack/repos/builtin/packages/m4/package.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/m4/package.py b/var/spack/repos/builtin/packages/m4/package.py index 2523745e58..267b9c3784 100644 --- a/var/spack/repos/builtin/packages/m4/package.py +++ b/var/spack/repos/builtin/packages/m4/package.py @@ -48,11 +48,13 @@ def configure_args(self): spec = self.spec args = ['--enable-c++'] + # CFLAGS handling + cflags = copy.deepcopy(optflags[self.spec.compiler.name]) if spec.satisfies('%clang') and not spec.satisfies('platform=darwin'): - args.append('CFLAGS=-rtlib=compiler-rt') - + cflags.append('-rtlib=compiler-rt') if spec.satisfies('%intel'): - args.append('CFLAGS=-no-gcc') + cflags.append('-no-gcc') + args.append('CFLAGS = {0}'.format(' '.join(cflags))) if '+sigsegv' in spec: args.append('--with-libsigsegv-prefix={0}'.format(