diff options
-rw-r--r-- | var/spack/repos/builtin/packages/ncurses/package.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/ncurses/package.py b/var/spack/repos/builtin/packages/ncurses/package.py index 383c0bf1d5..a68021f078 100644 --- a/var/spack/repos/builtin/packages/ncurses/package.py +++ b/var/spack/repos/builtin/packages/ncurses/package.py @@ -36,10 +36,14 @@ class Ncurses(AutotoolsPackage): def setup_environment(self, spack_env, run_env): spack_env.unset('TERMINFO') + def flag_handler(self, name, flags): + if name == 'cflags' or name == 'cxxflags': + flags.append(self.compiler.pic_flag) + + return (flags, None, None) + def configure(self, spec, prefix): opts = [ - 'CFLAGS={0}'.format(self.compiler.pic_flag), - 'CXXFLAGS={0}'.format(self.compiler.pic_flag), '--with-shared', '--with-cxx-shared', '--enable-overwrite', |