Project

General

Profile

Backport #8009

`make MAINLIBS=-ltcmalloc` does not work with new versions of gcc

Added by tmm1 (Aman Gupta) almost 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
[ruby-core:53121]

Description

With newer versions of gcc, linker arguments must appear after object files.

diff --git a/Makefile.in b/Makefile.in
index 45eb7c6..a93a1e6 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -194,12 +194,12 @@ all:
miniruby$(EXEEXT):
@-if test -f $@; then $(MV) -f $@ $@.old; $(RM) $@.old; fi
$(ECHO) linking $@

  • $(Q) $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINLIBS) $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT) $(DTRACE_OBJ) $(LIBS) $(OUTFLAG)$@
  • $(Q) $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT) $(DTRACE_OBJ) $(MAINLIBS) $(LIBS) $(OUTFLAG)$@

$(PROGRAM):
@$(RM) $@
$(ECHO) linking $@

  • $(Q) $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINLIBS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(LIBS) $(EXTLIBS) $(OUTFLAG)$@
  • $(Q) $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(MAINLIBS) $(LIBS) $(EXTLIBS) $(OUTFLAG)$@ $(Q) $(POSTLINK)

# We must `rm' the library each time this rule is invoked because "updating" a

Associated revisions

Revision a5a49630
Added by nobu (Nobuyoshi Nakada) almost 7 years ago

Makefile.in: move MAINLIBC after objects

  • Makefile.in (miniruby, ruby): move MAINLIBC because linker arguments must appear after object files with newer versions of gcc. patch by tmm1 (Aman Gupta) in [ruby-core:53121] [Bug #8009]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 39578
Added by nobu (Nobuyoshi Nakada) almost 7 years ago

Makefile.in: move MAINLIBC after objects

  • Makefile.in (miniruby, ruby): move MAINLIBC because linker arguments must appear after object files with newer versions of gcc. patch by tmm1 (Aman Gupta) in [ruby-core:53121] [Bug #8009]

Revision 39578
Added by nobu (Nobuyoshi Nakada) almost 7 years ago

Makefile.in: move MAINLIBC after objects

  • Makefile.in (miniruby, ruby): move MAINLIBC because linker arguments must appear after object files with newer versions of gcc. patch by tmm1 (Aman Gupta) in [ruby-core:53121] [Bug #8009]

Revision 39578
Added by nobu (Nobuyoshi Nakada) almost 7 years ago

Makefile.in: move MAINLIBC after objects

  • Makefile.in (miniruby, ruby): move MAINLIBC because linker arguments must appear after object files with newer versions of gcc. patch by tmm1 (Aman Gupta) in [ruby-core:53121] [Bug #8009]

Revision 39578
Added by nobu (Nobuyoshi Nakada) almost 7 years ago

Makefile.in: move MAINLIBC after objects

  • Makefile.in (miniruby, ruby): move MAINLIBC because linker arguments must appear after object files with newer versions of gcc. patch by tmm1 (Aman Gupta) in [ruby-core:53121] [Bug #8009]

Revision 39578
Added by nobu (Nobuyoshi Nakada) almost 7 years ago

Makefile.in: move MAINLIBC after objects

  • Makefile.in (miniruby, ruby): move MAINLIBC because linker arguments must appear after object files with newer versions of gcc. patch by tmm1 (Aman Gupta) in [ruby-core:53121] [Bug #8009]

Revision 39578
Added by nobu (Nobuyoshi Nakada) almost 7 years ago

Makefile.in: move MAINLIBC after objects

  • Makefile.in (miniruby, ruby): move MAINLIBC because linker arguments must appear after object files with newer versions of gcc. patch by tmm1 (Aman Gupta) in [ruby-core:53121] [Bug #8009]

Revision b7880f1f
Added by nagachika (Tomoyuki Chikanaga) over 6 years ago

merge revision(s) 39578: [Backport #8009]

    * Makefile.in (miniruby, ruby): move MAINLIBC because linker arguments
      must appear after object files with newer versions of gcc.  patch by
      tmm1 (Aman Gupta) in [ruby-core:53121] [Bug #8009]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 6c7a8b17
Added by usa (Usaku NAKAMURA) over 6 years ago

merge revision(s) 39578: [Backport #8009]

    * Makefile.in (miniruby, ruby): move MAINLIBC because linker arguments
      must appear after object files with newer versions of gcc.  patch by
      tmm1 (Aman Gupta) in [ruby-core:53121] [Bug #8009]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@40098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 40098
Added by usa (Usaku NAKAMURA) over 6 years ago

merge revision(s) 39578: [Backport #8009]

* Makefile.in (miniruby, ruby): move MAINLIBC because linker arguments
  must appear after object files with newer versions of gcc.  patch by
  tmm1 (Aman Gupta) in [ruby-core:53121] [Bug #8009]

History

#1

Updated by nobu (Nobuyoshi Nakada) almost 7 years ago

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

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


Makefile.in: move MAINLIBC after objects

  • Makefile.in (miniruby, ruby): move MAINLIBC because linker arguments must appear after object files with newer versions of gcc. patch by tmm1 (Aman Gupta) in [ruby-core:53121] [Bug #8009]
#2

Updated by nobu (Nobuyoshi Nakada) almost 7 years ago

  • Tracker changed from Bug to Backport
  • Project changed from Ruby master to Backport200
  • Category deleted (build)
  • Status changed from Closed to Assigned
  • Assignee changed from nobu (Nobuyoshi Nakada) to nagachika (Tomoyuki Chikanaga)
#3

Updated by nagachika (Tomoyuki Chikanaga) over 6 years ago

  • Status changed from Assigned to Closed

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


merge revision(s) 39578: [Backport #8009]

* Makefile.in (miniruby, ruby): move MAINLIBC because linker arguments
  must appear after object files with newer versions of gcc.  patch by
  tmm1 (Aman Gupta) in [ruby-core:53121] [Bug #8009]

Updated by tmm1 (Aman Gupta) over 6 years ago

Thanks. Could you backport this to 1.9.3 as well?

#5

Updated by usa (Usaku NAKAMURA) over 6 years ago

  • Project changed from Backport200 to Backport193
  • Status changed from Closed to Assigned
  • Assignee changed from nagachika (Tomoyuki Chikanaga) to usa (Usaku NAKAMURA)
#6

Updated by usa (Usaku NAKAMURA) over 6 years ago

  • Status changed from Assigned to Closed

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


merge revision(s) 39578: [Backport #8009]

* Makefile.in (miniruby, ruby): move MAINLIBC because linker arguments
  must appear after object files with newer versions of gcc.  patch by
  tmm1 (Aman Gupta) in [ruby-core:53121] [Bug #8009]

Also available in: Atom PDF