xserver: Branch 'master'

Paulo Cesar Pereira de Andrade pcpa at kemper.freedesktop.org
Thu Dec 11 09:12:01 PST 2008


 hw/xfree86/loader/Makefile.am |    2 +-
 hw/xfree86/loader/sdksyms.sh  |   12 +++++++++---
 2 files changed, 10 insertions(+), 4 deletions(-)

New commits:
commit 27261a950d91c352eac25a3036656c3e4f81fb12
Author: Paulo Cesar Pereira de Andrade <pcpa at mandriva.com.br>
Date:   Thu Dec 11 14:43:04 2008 -0200

      Modify sdksyms.sh to receive $top_srcdir as first argument.
    
      If the basename of header file processed by cpp matches $top_srcdir,
    check for extern symbols in the output, and add to the xorg_symbols
    vector.
      Possibly a better solution then using this script would be to somehow
    tell the linker to not drop any symbols from the binary being generated.

diff --git a/hw/xfree86/loader/Makefile.am b/hw/xfree86/loader/Makefile.am
index ccf16fc..19c7dab 100644
--- a/hw/xfree86/loader/Makefile.am
+++ b/hw/xfree86/loader/Makefile.am
@@ -24,4 +24,4 @@ libloader_la_SOURCES = \
 CLEANFILES = sdksyms.c
 
 sdksyms.c: sdksyms.sh
-	$(srcdir)/sdksyms.sh $(AM_CFLAGS) $(CFLAGS) $(INCLUDES)
+	$(srcdir)/sdksyms.sh $(top_srcdir) $(AM_CFLAGS) $(CFLAGS) $(INCLUDES)
diff --git a/hw/xfree86/loader/sdksyms.sh b/hw/xfree86/loader/sdksyms.sh
index b522096..41a68fb 100755
--- a/hw/xfree86/loader/sdksyms.sh
+++ b/hw/xfree86/loader/sdksyms.sh
@@ -319,18 +319,24 @@ cat > sdksyms.c << EOF
 
 EOF
 
-cpp -DXorgLoader $@ sdksyms.c | awk '
+topdir=$1
+shift
+cpp -DXorgLoader $@ sdksyms.c | awk -v topdir=$topdir '
 BEGIN {
     sdk = 0;
     print("/*");
     print(" * These symbols are referenced to ensure they");
     print(" * will be available in the X Server binary.");
     print(" */");
+    printf("/* topdir=%s */\n", topdir);
     print("_X_HIDDEN void *xorg_symbols[] = {");
 }
 /^# [0-9]+/ {
-    # only process text after a include in a relative path
-    sdk = $3 !~ /^"\//;
+    #   Process text after a include in a relative path or when the
+    # processed file has a basename matching $top_srcdir.
+    #   Note that indexing starts at 1; 0 means no match, and there
+    # is a starting ".
+    sdk = $3 !~ /^"\// || index($3, topdir) == 2;
 }
 
 /^extern[[:space:]]/  {


More information about the xorg-commit mailing list