Skip to content

Commit 535a742

Browse files
committed
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.
1 parent 5b1b495 commit 535a742

File tree

8 files changed

+38
-24
lines changed

8 files changed

+38
-24
lines changed

Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,7 @@ COMPILE_HOSTC = $(call COMPILE,HOSTCC)
6363
$(Q)echo '#include "$*.h"' >$@
6464

6565
%.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)/' $^ > $@
6967

7068
%.c %.h %.ver: TAG = GEN
7169

libavcodec/libavcodec.v

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
LIBAVCODEC_$MAJOR {
2-
global: av*;
3-
local: *;
1+
LIBAVCODEC_MAJOR {
2+
global:
3+
av*;
4+
local:
5+
*;
46
};

libavdevice/libavdevice.v

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
LIBAVDEVICE_$MAJOR {
2-
global: avdevice_*;
3-
local: *;
1+
LIBAVDEVICE_MAJOR {
2+
global:
3+
avdevice_*;
4+
local:
5+
*;
46
};

libavfilter/libavfilter.v

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
*;
47
};

libavformat/libavformat.v

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
LIBAVFORMAT_$MAJOR {
2-
global: av*;
3-
local: *;
1+
LIBAVFORMAT_MAJOR {
2+
global:
3+
av*;
4+
local:
5+
*;
46
};

libavresample/libavresample.v

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
LIBAVRESAMPLE_$MAJOR {
2-
global: av*;
3-
local: *;
1+
LIBAVRESAMPLE_MAJOR {
2+
global:
3+
av*;
4+
local:
5+
*;
46
};

libavutil/libavutil.v

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
LIBAVUTIL_$MAJOR {
2-
global: av*;
3-
local: *;
1+
LIBAVUTIL_MAJOR {
2+
global:
3+
av*;
4+
local:
5+
*;
46
};

libswscale/libswscale.v

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
*;
47
};

0 commit comments

Comments
 (0)