Skip to content
  • Paolo Bonzini's avatar
    5770e8af
    configure: do not clobber environment CFLAGS/CXXFLAGS/LDFLAGS · 5770e8af
    Paolo Bonzini authored
    
    
    If the CFLAGS, CXXFLAGS or LDFLAGS variables are present in the environment,
    any modification made within the configure script is passed down to Meson.
    This is particularly undesirable for the "-pie" option, since it overrides
    "-shared" and thus messes up the linker flags for shared modules.
    
    Using a separate variable therefore fixes the bug, while clarifying that
    the scope of these CFLAGS is just the configure script.
    
    We also do not need to pass those variables in config-host.mak; they
    were only used for printing the summary now that all submodules are
    built with handwritten Meson rules).  For now synthesize CFLAGS in the
    configuration summary, the next patch will also pass them in a cleaner
    way using the cross file.
    
    Reported-by: Frederic Bezies
    Analyzed-by: Toolybird
    Tested-by: default avatarRichard Henderson <richard.henderson@linaro.org>
    Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    Message-Id: <20200923092617.1593722-4-pbonzini@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    5770e8af
    configure: do not clobber environment CFLAGS/CXXFLAGS/LDFLAGS
    Paolo Bonzini authored
    
    
    If the CFLAGS, CXXFLAGS or LDFLAGS variables are present in the environment,
    any modification made within the configure script is passed down to Meson.
    This is particularly undesirable for the "-pie" option, since it overrides
    "-shared" and thus messes up the linker flags for shared modules.
    
    Using a separate variable therefore fixes the bug, while clarifying that
    the scope of these CFLAGS is just the configure script.
    
    We also do not need to pass those variables in config-host.mak; they
    were only used for printing the summary now that all submodules are
    built with handwritten Meson rules).  For now synthesize CFLAGS in the
    configuration summary, the next patch will also pass them in a cleaner
    way using the cross file.
    
    Reported-by: Frederic Bezies
    Analyzed-by: Toolybird
    Tested-by: default avatarRichard Henderson <richard.henderson@linaro.org>
    Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    Message-Id: <20200923092617.1593722-4-pbonzini@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Loading