Freebsd's sed doesn't support \< in regexps, and GNU sed doesn't
authorDan Gohman <gohman@apple.com>
Tue, 1 Jun 2010 17:08:56 +0000 (17:08 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 1 Jun 2010 17:08:56 +0000 (17:08 +0000)
support [[:<:]]. Use beginning-of-line and end-of-line anchors
instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105277 91177308-0d34-0410-b5e6-96231b3b80d8

Makefile.rules

index 942cb9d4d77ae58f7d71a41b08adb715badb38eb..fb1f83d22306ed9be97592bd31ebc3941ce7ff9c 100644 (file)
@@ -986,7 +986,7 @@ ifeq ($(HOST_OS),Darwin)
 # Darwin convention prefixes symbols with underscores.
 NativeExportsFile := $(ObjDir)/$(notdir $(EXPORTED_SYMBOL_FILE)).sed
 $(NativeExportsFile): $(EXPORTED_SYMBOL_FILE) $(ObjDir)/.dir
-       $(Verb) sed -e 's/[[:<:]]/_/' < $< > $@
+       $(Verb) sed -e 's/^/_/' < $< > $@
 clean-local::
        -$(Verb) $(RM) -f $(NativeExportsFile)
 else
@@ -996,7 +996,7 @@ NativeExportsFile := $(ObjDir)/$(notdir $(EXPORTED_SYMBOL_FILE)).map
 $(NativeExportsFile): $(EXPORTED_SYMBOL_FILE) $(ObjDir)/.dir
        $(Verb) echo "{" > $@
        $(Verb) grep -q "\<" $< && echo "  global:" >> $@ || :
-       $(Verb) sed -e 's/\>/;/' -e 's/^\</    /' < $< >> $@
+       $(Verb) sed -e 's/$$/;/' -e 's/^/    /' < $< >> $@
        $(Verb) echo "  local: *;" >> $@
        $(Verb) echo "};" >> $@
 clean-local::