Browse code

build: Change structure of the linker version script templates

Split version files into one line per symbol/directive to allow compatibility
with the Solaris linker without preprocessing and eliminate $ from version file
templates to simplify the postprocessing shell command.

Diego Biurrun authored on 2016/05/24 09:18:40
Showing 8 changed files
... ...
@@ -63,9 +63,7 @@ COMPILE_HOSTC = $(call COMPILE,HOSTCC)
63 63
 	$(Q)echo '#include "$*.h"' >$@
64 64
 
65 65
 %.ver: %.v
66
-	$(M)sed 's/$$MAJOR/$($(basename $(@F))_VERSION_MAJOR)/' $^ | sed -e 's/:/:\
67
-/' -e 's/; /;\
68
-/g' > $@
66
+	$(M)sed 's/MAJOR/$($(basename $(@F))_VERSION_MAJOR)/' $^ > $@
69 67
 
70 68
 %.c %.h %.ver: TAG = GEN
71 69
 
... ...
@@ -1,4 +1,6 @@
1
-LIBAVCODEC_$MAJOR {
2
-        global: av*;
3
-        local:  *;
1
+LIBAVCODEC_MAJOR {
2
+    global:
3
+        av*;
4
+    local:
5
+        *;
4 6
 };
... ...
@@ -1,4 +1,6 @@
1
-LIBAVDEVICE_$MAJOR {
2
-        global: avdevice_*;
3
-        local: *;
1
+LIBAVDEVICE_MAJOR {
2
+    global:
3
+        avdevice_*;
4
+    local:
5
+        *;
4 6
 };
... ...
@@ -1,4 +1,7 @@
1
-LIBAVFILTER_$MAJOR {
2
-        global: avfilter_*; av_*;
3
-        local: *;
1
+LIBAVFILTER_MAJOR {
2
+    global:
3
+        avfilter_*;
4
+        av_*;
5
+    local:
6
+        *;
4 7
 };
... ...
@@ -1,4 +1,6 @@
1
-LIBAVFORMAT_$MAJOR {
2
-        global: av*;
3
-        local: *;
1
+LIBAVFORMAT_MAJOR {
2
+    global:
3
+        av*;
4
+    local:
5
+        *;
4 6
 };
... ...
@@ -1,4 +1,6 @@
1
-LIBAVRESAMPLE_$MAJOR {
2
-        global: av*;
3
-        local:  *;
1
+LIBAVRESAMPLE_MAJOR {
2
+    global:
3
+        av*;
4
+    local:
5
+        *;
4 6
 };
... ...
@@ -1,4 +1,6 @@
1
-LIBAVUTIL_$MAJOR {
2
-        global: av*;
3
-        local: *;
1
+LIBAVUTIL_MAJOR {
2
+    global:
3
+        av*;
4
+    local:
5
+        *;
4 6
 };
... ...
@@ -1,4 +1,7 @@
1
-LIBSWSCALE_$MAJOR {
2
-        global: swscale_*; sws_*;
3
-        local: *;
1
+LIBSWSCALE_MAJOR {
2
+    global:
3
+        swscale_*;
4
+        sws_*;
5
+    local:
6
+        *;
4 7
 };