Ticket #3495 (new defect)

Opened 1 year ago

Last modified 1 year ago

respect $CFLAGS during build

Reported by: weyrick Assigned to: anonymous
Priority: normal Milestone: 3.0.0 release
Component: Build System Version:
Severity: minor Keywords:
Cc:

Description

we ignore this in our build environment

Change History

08/22/07 10:37:31 changed by hkBst

excerpt from bigloo-rules.mk:

# and for .c files %_s.o : %.c

$(CC) $(CSAFEFLAGS) $(C_PIC) -c $< -o $@

%_st.o : %.c

$(CC) $(C_STATICFLAGS) -DSTATIC_BIGLOO $(CSAFEFLAGS) -c $< -o $@

%_u.o : %.c

$(CC) $(CUNSAFEFLAGS) $(C_PIC) -c $< -o $@

%_ut.o : %.c

$(CC) $(C_STATICFLAGS) -DSTATIC_BIGLOO $(CUNSAFEFLAGS) -c $< -o $@

end excerpt. The only difference is in $(CSAFEFLAGS) versus $(CUNSAFEFLAGS) which differ in "-O -g" versus "-O4", so I think we lose nothing if we collapse these four rules to two that use CFLAGS instead. The question is what to do with the _s and _u suffixen. Remove them and only leave _t for the static variant? Replace them with _c to signify their origin?

08/23/07 04:18:53 changed by weyrick

it was decided we should simply tack CFLAGS into CSAFEFLAGS and CUNSAFEFLAGS. however, this only covers the case of compiling the c source files we have in the tree, not the C compiled by bigloo. bigloo was does respect CFLAGS. it DOES accept -copt, however, so we can add CFLAGS this way (and as of at least 3.0b, it accepts it as one argument, as opposed to requiring multiple -copt arguments)

08/23/07 04:20:49 changed by weyrick

EDITED:

it was decided we should simply tack CFLAGS onto CSAFEFLAGS and CUNSAFEFLAGS. however, this only covers the case of compiling the c source files we have in the tree, not the C compiled by bigloo. bigloo does not respect CFLAGS. it DOES accept -copt, however, so we can add CFLAGS this way (and as of at least 3.0b, it accepts it as one argument, as opposed to requiring multiple -copt arguments)

still open: should we set optimization on by default for unsafe builds, or let users do this via CFLAGS? note: bigloo DOES set -O for gcc based on the -O passed to bigloo (e.g. for bigloo -O6, bigloo will call gcc with -O2)