Project

General

Profile

This project is closed and read-only.

Actions

Backport #8009

closed

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

Backport #8009: `make MAINLIBS=-ltcmalloc` does not work with new versions of gcc

Added by tmm1 (Aman Karmani) over 13 years ago. Updated over 13 years ago.

Status:
Closed
[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

Updated by nobu (Nobuyoshi Nakada) over 13 years ago Actions #1

  • 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]

Updated by nobu (Nobuyoshi Nakada) over 13 years ago Actions #2

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

Updated by nagachika (Tomoyuki Chikanaga) over 13 years ago Actions #3

  • 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 Karmani) over 13 years ago Actions #4 [ruby-core:53704]

Thanks. Could you backport this to 1.9.3 as well?

Updated by usa (Usaku NAKAMURA) over 13 years ago Actions #5

  • Project changed from 15 to 13
  • Status changed from Closed to Assigned
  • Assignee changed from nagachika (Tomoyuki Chikanaga) to usa (Usaku NAKAMURA)

Updated by usa (Usaku NAKAMURA) over 13 years ago Actions #6

  • 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]
Actions

Also available in: PDF Atom