Skip to Content.
Sympa Menu

sm-sorcery-bugs - [SM-Sorcery-Bugs] [Bug 13965] New: custom CFLAGS should not go into CXXFLAGS

sm-sorcery-bugs AT lists.ibiblio.org

Subject: Bugs for Sorcery are reported here

List archive

Chronological Thread  
  • From: bugzilla-daemon AT bugs.sourcemage.org
  • To: sm-sorcery-bugs AT lists.ibiblio.org
  • Subject: [SM-Sorcery-Bugs] [Bug 13965] New: custom CFLAGS should not go into CXXFLAGS
  • Date: 28 Aug 2007 10:39:16 -0000

http://bugs.sourcemage.org/show_bug.cgi?id=13965

Summary: custom CFLAGS should not go into CXXFLAGS
Product: Sorcery
Version: 1.13.x
Platform: Other
OS/Version: other
Status: NEW
Severity: normal
Priority: P2
Component: subroutines
AssignedTo: sm-sorcery-bugs AT lists.ibiblio.org
ReportedBy: sobukus AT sourcemage.org


Our archspecs just set CFLAGS and thus it makes sense to derive CXXFLAGS from
these, but when user is given separate variables to add stuff to CFLAGS or
CXXFLAGS, this code in libsorcery might surprise:

export CFLAGS=$(echo -O $CFLAGS $CUSTOM_CFLAGS $OVERRIDE_CFLAGS)
export CXXFLAGS=$(echo $CFLAGS $CUSTOM_CXXFLAGS $OVERRIDE_CXXFLAGS)

(the -O is gone in devel sorcery, I think)

Do we really intend to set

CXXFLAGS=$(echo -O $CFLAGS $CUSTOM_CFLAGS $OVERRIDE_CFLAGS $CUSTOM_CXXFLAGS)
$OVERRIDE_CXXFLAGS)

I think the CUSTOM_CFLAGS and OVERRIDE_CFLAGS do not belong into CXXFLAGS.
I understand that we mix these two for arch specific stuff, as the arch flags
are identical for gcc and g++; and should be set for both.
A user may want to add something for C compiles, but not for C++ compiles.

I stumbled over this when testing a spell with PIC issues on my IA32 box.
I set both custom CFLAGS and CXXFLAGS to "-fPIC -DPIC" and ended up with
these
flags twice in CXXFLAGS, which made the build fail since disable_pic only
removes one occurence (which may be a bug on its own...).
I need to enter the extra flags once for CFLAGS and _not_ in CXXFLAGS in the
sorcery menu to make them appear once in each ... that is not intuitive.

So what about (without the -O ...)

export CXXFLAGS=$(echo $CFLAGS $CUSTOM_CXXFLAGS $OVERRIDE_CXXFLAGS)
export CFLAGS=$(echo $CFLAGS $CUSTOM_CFLAGS $OVERRIDE_CFLAGS)

for libsorcery ?

--
Configure bugmail: http://bugs.sourcemage.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



  • [SM-Sorcery-Bugs] [Bug 13965] New: custom CFLAGS should not go into CXXFLAGS, bugzilla-daemon, 08/28/2007

Archive powered by MHonArc 2.6.24.

Top of Page