pkgsrc/lang/clang/patches/patch-ac
marino c77b6b8746 lang/clang: Fix binary generation on latest DragonFly
Clang was hardwired to search for crt* stuff and libstdc++ at
/usr/lib/gcc41.  This worked for most people even when DragonFly
moved to gcc 4.4 as the primary base compiler since gcc 4.1 was
usually also on the system.

With the release of DragonFly 3.2, gcc 4.7 replaced gcc 4.1 and
clang stopped compiling due to not being able to find libraries and
crt* objects.  The new patches make clang driver first look for
gcc 4.7 and failing to find that: gcc 4.4.

The other patches were "de-fuzzed".
Revision bump was necessary because clang did build, it just didn't
work.

Patches submitted upstream:
http://llvm.org/bugs/show_bug.cgi?id=14417
2012-11-22 22:45:15 +00:00

46 lines
1.7 KiB
Text

$NetBSD: patch-ac,v 1.5 2012/11/22 22:45:15 marino Exp $
--- Makefile.rules.orig 2012-05-15 22:06:08.000000000 +0000
+++ Makefile.rules
@@ -625,11 +625,6 @@ ifneq ($(HOST_OS), $(filter $(HOST_OS),
ifneq ($(HOST_OS), Darwin)
ifdef TOOLNAME
LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib'
- ifdef EXAMPLE_TOOL
- LD.Flags += $(RPATH) -Wl,$(ExmplDir) $(DynamicFlag)
- else
- LD.Flags += $(RPATH) -Wl,$(ToolDir) $(DynamicFlag)
- endif
endif
else
ifneq ($(DARWIN_MAJVERS),4)
@@ -821,9 +816,6 @@ endif
# in the file so they get built before dependencies
#---------------------------------------------------------
-$(DESTDIR)$(PROJ_bindir) $(DESTDIR)$(PROJ_libdir) $(DESTDIR)$(PROJ_includedir) $(DESTDIR)$(PROJ_etcdir)::
- $(Verb) $(MKDIR) $@
-
# To create other directories, as needed, and timestamp their creation
%/.dir:
$(Verb) $(MKDIR) $* > /dev/null
@@ -958,7 +950,9 @@ install-local::
uninstall-local::
$(Echo) UnInstall circumvented with NO_INSTALL
else
-install-local:: $(DESTDIR)$(PROJ_etcdir) $(CONFIG_FILES)
+PROJ_etcdir=${PREFIX}/share/examples/llvm
+install-local:: $(CONFIG_FILES)
+ $(MKDIR) ${PROJ_etcdir}
$(Echo) Installing Configuration Files To $(DESTDIR)$(PROJ_etcdir)
$(Verb)for file in $(CONFIG_FILES); do \
if test -f $(PROJ_OBJ_DIR)/$${file} ; then \
@@ -1380,7 +1374,7 @@ install-local:: $(DestArchiveLib)
$(DestArchiveLib): $(LibName.A) $(DESTDIR)$(PROJ_libdir)
$(Echo) Installing $(BuildMode) Archive Library $(DestArchiveLib)
$(Verb) $(MKDIR) $(DESTDIR)$(PROJ_libdir)
- $(Verb) $(INSTALL) $(LibName.A) $(DestArchiveLib)
+ $(Verb) $(DataInstall) $(LibName.A) $(DestArchiveLib)
uninstall-local::
$(Echo) Uninstalling $(BuildMode) Archive Library $(DestArchiveLib)