Backport #7120

[[Ruby 1.9:]] ${cflags} missing from CFLAGS

Added by Michal Papis over 1 year ago. Updated over 1 year ago.

[ruby-core:47868]
Status:Closed
Priority:Normal
Assignee:Usaku NAKAMURA

Description

=begin
Because ruby does not allow multiple --with-opt-dir= - so RVM uses CFLAGS=/LDFLAGS= to not block --with-opt-dir= from users.

This lead to an issue where ruby detected flags are not set if CFLAGS is provided earlier.

I did prepare a patch to persist the detected flags in CFLAGS: https://gist.github.com/3854178.

There is no way for user to detect the flags by himself, user would have to reproduce the whole ruby detection process to make it working.

The patch puts ${cflags} before the given CFLAGS, so users can still overwrite the auto-detected values as the last flag is relevant.

There is an initial report if more context is needed: https://github.com/wayneeseguin/rvm/issues/1203
=end

Associated revisions

Revision 37266
Added by Usaku NAKAMURA over 1 year ago

merge revision(s) 37242: [Backport #7120]

* configure.in (opt-dir): allow multiple directories separated by
  $PATH_SEPARATOR as well as dir_config in mkmf.rb. 
  [Bug #7120]

History

#1 Updated by Nobuyoshi Nakada over 1 year ago

  • Status changed from Open to Rejected

--with-opt-dir allows multiple paths separated by File::PATH_SEPARATOR.

#2 Updated by Michal Papis over 1 year ago

=begin
Then help for configure should be updated, in current state it indicates that it's just one path:

--with-opt-dir=DIR      add optional headers and libraries DIR

Also adding support for multiple --with-opt-dir= would be awesome, so it would be easy to put multiple dirs without parsing if --with-opt-dir= was already specified.
=end

#3 Updated by Nobuyoshi Nakada over 1 year ago

  • Status changed from Rejected to Open

#4 Updated by Nobuyoshi Nakada over 1 year ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r37242.
Michal, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


configure.in: multiple opt-dir

  • configure.in (opt-dir): allow multiple directories separated by $PATHSEPARATOR as well as dirconfig in mkmf.rb. [Bug #7120]

#5 Updated by Michal Papis over 1 year ago

Will this fix be merged back to 1.9.3 or should I rely on my patch when using CFLAGS / LDFLAGS?

#6 Updated by Usaku NAKAMURA over 1 year ago

  • Status changed from Closed to Assigned
  • Assignee set to Usaku NAKAMURA
  • Target version set to 1.9.3

It'll be backported.

#7 Updated by Usaku NAKAMURA over 1 year ago

  • Tracker changed from Bug to Backport
  • Project changed from ruby-trunk to Backport93
  • Target version deleted (1.9.3)

#8 Updated by Usaku NAKAMURA over 1 year ago

  • Status changed from Assigned to Closed

This issue was solved with changeset r37266.
Michal, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


merge revision(s) 37242: [Backport #7120]

* configure.in (opt-dir): allow multiple directories separated by
  $PATH_SEPARATOR as well as dir_config in mkmf.rb. 
  [Bug #7120]

Also available in: Atom PDF