ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:72444] [Ruby trunk - Bug #11863] [Open] configure/makefile needs to follow the standard behavior
       [not found] <redmine.issue-11863.20151222212548@ruby-lang.org>
@ 2015-12-22 21:25 ` luizluca
  2016-10-21 12:47 ` [ruby-core:77698] [Ruby trunk Bug#11863] " v.ondruch
  2016-10-21 12:47 ` [ruby-core:77699] " v.ondruch
  2 siblings, 0 replies; 3+ messages in thread
From: luizluca @ 2015-12-22 21:25 UTC (permalink / raw)
  To: ruby-core

Issue #11863 has been reported by Luiz Angelo Daros de Luca.

----------------------------------------
Bug #11863: configure/makefile needs to follow the standard behavior
https://bugs.ruby-lang.org/issues/11863

* Author: Luiz Angelo Daros de Luca
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: ruby 2.2.4p230 (2015-12-16 revision 53155) [i486-linux-gnu]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
Hello,

I'm the current OpenWRT maintainer of ruby packages.
However, configure/makefile for ruby has some exotic usages.

LDFLAGS is used only for execs
DLDFLAGS for libraries
XLDFLAGS for extra options for both.

Normally, it is expected that LDFLAGS applies to all linked code.
If ruby needs something special for each case, I guess the extra
?LDFLAGS should append to what LDFLAGS defines (and in Makefile).

DLDFLAGS is a special confusion. It is an accepted configure VAR.
However, that really defines DLDFLAGS in Makefile is not DLDFLAGS but LIBRUBY_DLDFLAGS.
At first, LIBRUBY_DLDFLAGS uses DLDFLAGS to define its initial value. However, for some targets,
it is simply overwritten (i.e.: for linux).

XLDFLAGS also has this problem of not respecting what was defined. However, reading the code, this happens only for AIX. I wasn't hit by this bug.

I noticed in some places that some configure vars include other vars as value. Ex:

darwin*) :
...
LIBRUBY_DLDFLAGS="$LIBRUBY_DLDFLAGS "' $(XLDFLAGS)'

Normally all vars should include only new arguments. The job of merging VAR values should
be done in Makefile. This happens for most of vars, but not for some cases like LIBRUBY_DLDFLAGS.
Specially for this example, LIBRUBY_DLDFLAGS is only used to define DLDFLAGS in Makefile and it
DOES already include XLDFLAGS there. Appending var values with another var both in configure and makefile
makes the build debugging a lot harder, specially if it changes the var names.

What would be expected by configure/makefile:
1) standard vars like CFLAGS, LDFLAGS, etc should be respected for all compiled/linked code.
2) all accepted env var defined for configure should not be replaced internally by ./configure but only appended.
3) var XYZ defined in configure should be the one that defines var XYZ in Makefile. Extra opts not appended should come from an extra var.
4) var XYZ should not include the value of another var ABC in configure. Do it in Makefile.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-core:77698] [Ruby trunk Bug#11863] configure/makefile needs to follow the standard behavior
       [not found] <redmine.issue-11863.20151222212548@ruby-lang.org>
  2015-12-22 21:25 ` [ruby-core:72444] [Ruby trunk - Bug #11863] [Open] configure/makefile needs to follow the standard behavior luizluca
@ 2016-10-21 12:47 ` v.ondruch
  2016-10-21 12:47 ` [ruby-core:77699] " v.ondruch
  2 siblings, 0 replies; 3+ messages in thread
From: v.ondruch @ 2016-10-21 12:47 UTC (permalink / raw)
  To: ruby-core

Issue #11863 has been updated by Vit Ondruch.


Ping? What this the state. Now I noticed that the LDFLAGS are not used during build of Fedora package, so Ruby is not properly hardened as it should be. That is unexpected :/

----------------------------------------
Bug #11863: configure/makefile needs to follow the standard behavior
https://bugs.ruby-lang.org/issues/11863#change-60980

* Author: Luiz Angelo Daros de Luca
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: ruby 2.2.4p230 (2015-12-16 revision 53155) [i486-linux-gnu]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
Hello,

I'm the current OpenWRT maintainer of ruby packages.
However, configure/makefile for ruby has some exotic usages.

LDFLAGS is used only for execs
DLDFLAGS for libraries
XLDFLAGS for extra options for both.

Normally, it is expected that LDFLAGS applies to all linked code.
If ruby needs something special for each case, I guess the extra
?LDFLAGS should append to what LDFLAGS defines (and in Makefile).

DLDFLAGS is a special confusion. It is an accepted configure VAR.
However, that really defines DLDFLAGS in Makefile is not DLDFLAGS but LIBRUBY_DLDFLAGS.
At first, LIBRUBY_DLDFLAGS uses DLDFLAGS to define its initial value. However, for some targets,
it is simply overwritten (i.e.: for linux).

XLDFLAGS also has this problem of not respecting what was defined. However, reading the code, this happens only for AIX. I wasn't hit by this bug.

I noticed in some places that some configure vars include other vars as value. Ex:

darwin*) :
...
LIBRUBY_DLDFLAGS="$LIBRUBY_DLDFLAGS "' $(XLDFLAGS)'

Normally all vars should include only new arguments. The job of merging VAR values should
be done in Makefile. This happens for most of vars, but not for some cases like LIBRUBY_DLDFLAGS.
Specially for this example, LIBRUBY_DLDFLAGS is only used to define DLDFLAGS in Makefile and it
DOES already include XLDFLAGS there. Appending var values with another var both in configure and makefile
makes the build debugging a lot harder, specially if it changes the var names.

What would be expected by configure/makefile:
1) standard vars like CFLAGS, LDFLAGS, etc should be respected for all compiled/linked code.
2) all accepted env var defined for configure should not be replaced internally by ./configure but only appended.
3) var XYZ defined in configure should be the one that defines var XYZ in Makefile. Extra opts not appended should come from an extra var.
4) var XYZ should not include the value of another var ABC in configure. Do it in Makefile.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-core:77699] [Ruby trunk Bug#11863] configure/makefile needs to follow the standard behavior
       [not found] <redmine.issue-11863.20151222212548@ruby-lang.org>
  2015-12-22 21:25 ` [ruby-core:72444] [Ruby trunk - Bug #11863] [Open] configure/makefile needs to follow the standard behavior luizluca
  2016-10-21 12:47 ` [ruby-core:77698] [Ruby trunk Bug#11863] " v.ondruch
@ 2016-10-21 12:47 ` v.ondruch
  2 siblings, 0 replies; 3+ messages in thread
From: v.ondruch @ 2016-10-21 12:47 UTC (permalink / raw)
  To: ruby-core

Issue #11863 has been updated by Vit Ondruch.

Assignee set to Nobuyoshi Nakada

----------------------------------------
Bug #11863: configure/makefile needs to follow the standard behavior
https://bugs.ruby-lang.org/issues/11863#change-60981

* Author: Luiz Angelo Daros de Luca
* Status: Open
* Priority: Normal
* Assignee: Nobuyoshi Nakada
* ruby -v: ruby 2.2.4p230 (2015-12-16 revision 53155) [i486-linux-gnu]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
Hello,

I'm the current OpenWRT maintainer of ruby packages.
However, configure/makefile for ruby has some exotic usages.

LDFLAGS is used only for execs
DLDFLAGS for libraries
XLDFLAGS for extra options for both.

Normally, it is expected that LDFLAGS applies to all linked code.
If ruby needs something special for each case, I guess the extra
?LDFLAGS should append to what LDFLAGS defines (and in Makefile).

DLDFLAGS is a special confusion. It is an accepted configure VAR.
However, that really defines DLDFLAGS in Makefile is not DLDFLAGS but LIBRUBY_DLDFLAGS.
At first, LIBRUBY_DLDFLAGS uses DLDFLAGS to define its initial value. However, for some targets,
it is simply overwritten (i.e.: for linux).

XLDFLAGS also has this problem of not respecting what was defined. However, reading the code, this happens only for AIX. I wasn't hit by this bug.

I noticed in some places that some configure vars include other vars as value. Ex:

darwin*) :
...
LIBRUBY_DLDFLAGS="$LIBRUBY_DLDFLAGS "' $(XLDFLAGS)'

Normally all vars should include only new arguments. The job of merging VAR values should
be done in Makefile. This happens for most of vars, but not for some cases like LIBRUBY_DLDFLAGS.
Specially for this example, LIBRUBY_DLDFLAGS is only used to define DLDFLAGS in Makefile and it
DOES already include XLDFLAGS there. Appending var values with another var both in configure and makefile
makes the build debugging a lot harder, specially if it changes the var names.

What would be expected by configure/makefile:
1) standard vars like CFLAGS, LDFLAGS, etc should be respected for all compiled/linked code.
2) all accepted env var defined for configure should not be replaced internally by ./configure but only appended.
3) var XYZ defined in configure should be the one that defines var XYZ in Makefile. Extra opts not appended should come from an extra var.
4) var XYZ should not include the value of another var ABC in configure. Do it in Makefile.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-10-21 12:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <redmine.issue-11863.20151222212548@ruby-lang.org>
2015-12-22 21:25 ` [ruby-core:72444] [Ruby trunk - Bug #11863] [Open] configure/makefile needs to follow the standard behavior luizluca
2016-10-21 12:47 ` [ruby-core:77698] [Ruby trunk Bug#11863] " v.ondruch
2016-10-21 12:47 ` [ruby-core:77699] " v.ondruch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).