This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ld_compile: force CFLAGS really necessary ?


Hi Mike,

   * Not all C++ source files use the .cc file extension.  Earlier on in
proc default_ld_compile there is code to determine if the compiler is gcc
or g++, maybe you could tap into that ?

i think you mean latter on in default_ld_compile ?

Yes.


> are you referring to this code snippet ?
    set ccexe [string replace $ccexe 0 [string last "/" $ccexe] ""]
    if {[string match "*gcc*" $ccexe] || [string match "*++*" $ccexe]} then {
	set flags "$gcc_gas_flag $flags"
    }

Yes. I thought that you could split it up into separate "*gcc*" and "*++*" tests and add in the append of CFLAGS or CXXFLAGS to flags as appropriate.


Cheers
  Nick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]