[haiku-commits] Re: r40300 - haiku/trunk/data/develop

  • From: Siarzhuk Zharski <zharik@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 30 Jan 2011 23:35:40 +0100

Hi Alexander,

Am 27.01.2011 23:30, schrieb kallisti5@xxxxxxxxxxx:
Author: kallisti5
Date: 2011-01-27 23:30:25 +0100 (Thu, 27 Jan 2011)
New Revision: 40300
Changeset: http://dev.haiku-os.org/changeset/40300
Ticket: http://dev.haiku-os.org/ticket/5375

Modified:
    haiku/trunk/data/develop/makefile-engine
Log:
allow end users to modify linker used in makefiles, resolves #5375

Modified: haiku/trunk/data/develop/makefile-engine
===================================================================
--- haiku/trunk/data/develop/makefile-engine    2011-01-27 21:50:42 UTC (rev 
40299)
+++ haiku/trunk/data/develop/makefile-engine    2011-01-27 22:30:25 UTC (rev 
40300)
@@ -79,7 +79,7 @@
        endif

  #     set the linker and linker flags
-       LD                      := gcc
+       LD                      ?= gcc

Have you checked all cases and side effects of this modification before commiting? That breaks my builds with following message:
======
ld -o "objects.x86-gcc4-debug/Tolmach" objects.x86-gcc4-debug/TolmachApp.o objects.x86-gcc4-debug/Preferences.o objects.x86-gcc4-debug/TolmachWin.o objects.x86-gcc4-debug/TolmachView.o objects.x86-gcc4-debug/PGBHandler.o objects.x86-gcc4-debug/PGBIndex.o -g -Xlinker -soname=_APP_ -L./ -lroot -lbe -ltextencoding -lstdc++ -llocale -llocalestub
ld: cannot find -linker
======

The makefile used is a typical generic makefile, the system is clear and just installed - no special definition was set for $(LD) variable in environment.

In case that change is reverted - all goes OK:
======
gcc -o "objects.x86-gcc4-debug/Tolmach" objects.x86-gcc4-debug/TolmachApp.o objects.x86-gcc4-debug/Preferences.o objects.x86-gcc4-debug/TolmachWin.o objects.x86-gcc4-debug/TolmachView.o objects.x86-gcc4-debug/PGBHandler.o objects.x86-gcc4-debug/PGBIndex.o -g -Xlinker -soname=_APP_ -L./ -lroot -lbe -ltextencoding -lstdc++ -llocale -llocalestub
======

Please fix or revert your modification.

By the way, the makefile-engine have at the top some samples of another way of redefining variables:
======
16    ifeq ($(NAME), )
17        NAME = NameThisApp
18    endif
======

and, I found such mixture of styles not a good idea. :-(

---
Kind Regards,
  S.Zharski


Other related posts: