Project

General

Profile

Actions

Backport #8009

closed

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

Added by tmm1 (Aman Karmani) about 11 years ago. Updated almost 11 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

Actions #1

Updated by nobu (Nobuyoshi Nakada) about 11 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]
Actions #2

Updated by nobu (Nobuyoshi Nakada) about 11 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)
Actions #3

Updated by nagachika (Tomoyuki Chikanaga) about 11 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 Karmani) about 11 years ago

Thanks. Could you backport this to 1.9.3 as well?

Actions #5

Updated by usa (Usaku NAKAMURA) almost 11 years ago

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

Updated by usa (Usaku NAKAMURA) almost 11 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]
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0