llvm34-3.4.1-0e to fix -stdlib=libc++ on 10.7 as well

Jack Howarth <[email protected]>
Newsgroups gmane.os.apple.fink.devel
Message-ID <CAP5Ds0Bp_hCb_nmRxydb-ireJFO+CqzzwJ9r=BEQwroEUPPVKg@mail.gmail.com>
David,
     Sorry about the extra revision here to fix the libc++ header detection
on 10.7 as well.

% clang++-3.4 -stdlib=libc++ hello.cc
hello.cc:1:10: fatal error: 'iostream' file not found
#include <iostream>
         ^
1 error generated.

I assumed that libc++ header detection was already functional on 10.7. So
in llvm34-3.4.1-0a/c, the system libc++ header detection as broken on all
three targets of the 10.7 tree.
      I don't think Apple ever has ever placed the system libc++ headers in
default path of /usr/include/c++/v1 but rather always found these headers
via a path relative to the executing compiler binary's location.
     After completing 'fink -m -l' bootstraps on 10.7, 10.8 and 10.9 as
well as manual verification on all three targets that 'clang++
-stdlib=libc++' found the system libc++ headers, I committed the following
change to the 10.7 tree.

--- llvm34.info.orig 2014-05-25 17:43:03.000000000 -0400
+++ llvm34.info 2014-05-25 17:06:43.000000000 -0400
@@ -1,7 +1,7 @@
 Info3: <<
 Package: llvm34
 Version: 3.4.1
-Revision: 0d
+Revision: 0e
 Description: Modular and reusable compiler
 License: BSD
 Maintainer: David Fang <[email protected]>
@@ -130,12 +130,12 @@
  fi

  # Adjust path for relocation of libc++ headers
- if test "$darwin_vers" -eq 12
- then sed -i.orig2 -e
's|AddPath("/usr/include/c++/v1"|AddPath("/usr/lib/c++/v1"|' \
- tools/clang/lib/Frontend/InitHeaderSearch.cpp
- elif test "$darwin_vers" -ge 13
+ if test "$darwin_vers" -ge 13
  then sed -i.orig2 -e
's|AddPath("/usr/include/c++/v1"|AddPath("/Library/Developer/CommandLineTools/usr/lib/c++/v1"|'
\
  tools/clang/lib/Frontend/InitHeaderSearch.cpp
+ elif test "$darwin_vers" -ge 11
+ then sed -i.orig2 -e
's|AddPath("/usr/include/c++/v1"|AddPath("/usr/lib/c++/v1"|' \
+ tools/clang/lib/Frontend/InitHeaderSearch.cpp
  fi

 # needed for gcc-fsf-4.x only

This same change to the PatchScript also needs to be backported to the
llvm33 package so it can find the system libc++ headers as well.
        Jack

------------------------------------------------------------------------------
The best possible search technologies are now affordable for all companies.
Download your FREE open source Enterprise Search Engine today!
Our experts will assist you in its installation for $59/mo, no commitment.
Test it for FREE on our Cloud platform anytime!
http://pubads.g.doubleclick.net/gampad/clk?id=145328191&iu=/4140/ostg.clktrk

_______________________________________________
Fink-devel mailing list
[email protected]
List archive:
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.