Use a posix compliant regexp in export file construction.
authorEric Christopher <echristo@apple.com>
Mon, 12 Mar 2012 20:58:14 +0000 (20:58 +0000)
committerEric Christopher <echristo@apple.com>
Mon, 12 Mar 2012 20:58:14 +0000 (20:58 +0000)
Patch by John Spencer

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

Makefile.rules

index 6fd3249fcb1085114d68ea0609f35e51eb275aad..76cec18ff8aaeeb53ed7e3a86e7bec47d1c0eb33 100644 (file)
@@ -1070,7 +1070,7 @@ ifeq ($(HAVE_LINK_VERSION_SCRIPT),1)
 NativeExportsFile := $(ObjDir)/$(notdir $(EXPORTED_SYMBOL_FILE)).map
 $(NativeExportsFile): $(EXPORTED_SYMBOL_FILE) $(ObjDir)/.dir
        $(Verb) echo "{" > $@
-       $(Verb) grep -q "\<" $< && echo "  global:" >> $@ || :
+       $(Verb) grep -q '[[:alnum:]_]' $< && echo "  global:" >> $@ || :
        $(Verb) sed -e 's/$$/;/' -e 's/^/    /' < $< >> $@
 ifneq ($(HOST_OS),OpenBSD)
        $(Verb) echo "  local: *;" >> $@