Skip to content

Commit

Permalink
build: Change structure of the linker version script templates
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
DonDiego committed May 29, 2016
1 parent 5b1b495 commit 535a742
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 24 deletions.
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ COMPILE_HOSTC = $(call COMPILE,HOSTCC)
$(Q)echo '#include "$*.h"' >$@

%.ver: %.v
$(M)sed 's/$$MAJOR/$($(basename $(@F))_VERSION_MAJOR)/' $^ | sed -e 's/:/:\
/' -e 's/; /;\
/g' > $@
$(M)sed 's/MAJOR/$($(basename $(@F))_VERSION_MAJOR)/' $^ > $@

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

Expand Down
8 changes: 5 additions & 3 deletions libavcodec/libavcodec.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
LIBAVCODEC_$MAJOR {
global: av*;
local: *;
LIBAVCODEC_MAJOR {
global:
av*;
local:
*;
};
8 changes: 5 additions & 3 deletions libavdevice/libavdevice.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
LIBAVDEVICE_$MAJOR {
global: avdevice_*;
local: *;
LIBAVDEVICE_MAJOR {
global:
avdevice_*;
local:
*;
};
9 changes: 6 additions & 3 deletions libavfilter/libavfilter.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
LIBAVFILTER_$MAJOR {
global: avfilter_*; av_*;
local: *;
LIBAVFILTER_MAJOR {
global:
avfilter_*;
av_*;
local:
*;
};
8 changes: 5 additions & 3 deletions libavformat/libavformat.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
LIBAVFORMAT_$MAJOR {
global: av*;
local: *;
LIBAVFORMAT_MAJOR {
global:
av*;
local:
*;
};
8 changes: 5 additions & 3 deletions libavresample/libavresample.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
LIBAVRESAMPLE_$MAJOR {
global: av*;
local: *;
LIBAVRESAMPLE_MAJOR {
global:
av*;
local:
*;
};
8 changes: 5 additions & 3 deletions libavutil/libavutil.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
LIBAVUTIL_$MAJOR {
global: av*;
local: *;
LIBAVUTIL_MAJOR {
global:
av*;
local:
*;
};
9 changes: 6 additions & 3 deletions libswscale/libswscale.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
LIBSWSCALE_$MAJOR {
global: swscale_*; sws_*;
local: *;
LIBSWSCALE_MAJOR {
global:
swscale_*;
sws_*;
local:
*;
};

0 comments on commit 535a742

Please sign in to comment.