Ticket #6102 (new defect)

SVN Diffs for #6102

 

Opened 2 years ago

Last modified 3 months ago

icu-config hardcodes C[XX|PP]FLAGS and LDFLAGS

Reported by: jakub@... Assigned to: srl
Priority: minor Milestone: UNSCH
Component: config_build Version: 3.8.1
Keywords: Cc:
Load: Xref:
Java Version: Operating System:
Project (C/J): ICU4C Weeks: 0.5
Review:

Description

This really doesn't belong there, please don't add such stuff in config/Makefile.inc.in as it injects these flags into any package that depends on ICU and uses icu-config during compile.

See http://bugs.gentoo.org/show_bug.cgi?id=202059 for downstream bug.

Attachments

Change History

12/20/07 01:13:03 changed by grhoten

  • priority changed from major to minor.
  • project changed from all to ICU4C.
  • weeks changed.
  • xref changed.
  • revw changed.

Can you describe the problem in more detail or supply a patch? It looks like icu-config is working as designed, and the bug report is a little too vague about what problem needs to be fixed.

Test cases and samples are always welcome.

On a related note, we don't use automake. ICU only uses GNU make. Makefile.inc is only meant for GNU makefiles. The icu-config script is meant for any non-GNU makefiles.

12/20/07 09:23:13 changed by srl

  • version changed from Current to 3.8.1.

This and the downstream bug are very short on details. * How are you obtaining the specific flag values? (steps to reproduce) * What should the values be? (expected results) * What are the values you are seeing? (observed results)

Makefile.inc sets a lot of things, probably a lot of things you don't need or want set. It is designed to give you another option for building, especially very small programs - not large complicated projects which have their own opinion about different things. If you want specific pieces of the configuration, use icu-config.

I'm not sure what the downstream bug is trying to say. Can you clarify it and put the clarification here as a reply?

( By the way the .ebuild file is wrong, this project is actually "International Components for Unicode" )

12/23/07 06:20:36 changed by anonymous

You are sticking C[XX|PP]FLAGS/LDFLAGS *used* for compile into icu-config. Subsequently, when any other application uses icu-config --{cflags,ldflags} or whatnot to find out the needed info, this injects those C[XX|PP]FLAGS/LDFLAGS to compile of that application.

That's obviously wrong - user-specified flags may have changed meanwhile, this also kills any crosscompile because passing stuff like -march=athlon-xp when you want to cross-compile this for amd64 or ppc or whatever other arch plain won't fly.

Once again - the icu-config output should only provide the stuff shown in http://bugs.gentoo.org/show_bug.cgi?id=202059#c2, not any user-specified C[XX|PP]FLAGS/LDFLAGS used at compile-time.

Thanks.

12/23/07 06:34:18 changed by jakub@...

A quick fix, as used in the Gentoo ebuild:

for x in CFLAGS CXXFLAGS CPPFLAGS LDFLAGS ; do

sed -i -e "/${x} =.*/s:@${x}@::" config/Makefile.inc.in

done

I.e., do not do things like CFLAGS = @CFLAGS@ in the above file. If you need/want flags like -W* or -D* there, that's fine, but injecting flags passed by user at compile time (such as -march=athlon-xp -O2 -pipe -fomit-frame-pointer) is definitely no good.

12/23/07 06:35:56 changed by jakub@...

Stupid trac autoformatting... :/

for x in CFLAGS CXXFLAGS CPPFLAGS LDFLAGS ; do
	sed -i -e "/^${x} =.*/s:@${x}@::" config/Makefile.inc.in
done

01/31/08 20:35:50 changed by grhoten

  • owner changed from somebody to srl.
  • weeks set to 0.5.

12/02/09 23:32:44 changed by kareem198625@...

now,<a href="http://www.newpaulsmith.com/paul-smith-shoes-c-518.html"> Paul Smith shoes</a>,<a href="http://www.newpaulsmith.com/paul-smith-sweaters-c-526.html"> paul smith clothing</a>, and<a href="http://www.newpaulsmith.com/paul-smith-sweaters-c-526.html"> paul smith swimwear</a> are beautifully crafted with brilliant attention to detail. Paul Smith socs are an unexpected element of fun to any ensemble. Collections are primarily produced in England and Italy, while the fabrics used are mainly of Italian, French and British origin.

12/17/09 21:34:59 changed by ZacharySkermont@...

<a href="http://www.newpaulsmith.com">cheap paul smith</a> has grown from a small time surf brand, a global leader in luxury sheepskin footwear. Also<a href="http://www.newpaulsmith.com/paul-smith-bags-vertical-stripes-with-chocolate-leather-p-21897.html">paul smith wallets</a> been beyond the range of products include casual shoes, <a href="http://www.newpaulsmith.com/paul-smith-canvas-holdall-bookcase-mini-car-chocolate-leather-p-21887.html">paul smith belts</a>, shirt, as well as weather and Australia to make a fine sheepskin products.


Add/Change #6102 (icu-config hardcodes C[XX|PP]FLAGS and LDFLAGS)




Anti spam check: