X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fcairo%2F0001-blackfin-build-fix.patch;fp=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fcairo%2F0001-blackfin-build-fix.patch;h=0e8dd3ad65fb479e1f3ef1a90b820339b6e66d5f;hb=b0a0f15dfaa205161a7fcb20cf1b8cd4948c2ef3;hp=0000000000000000000000000000000000000000;hpb=c6ac3cd55ee2da956195eee393b0882105dfad4e;p=packages%2Ftrusty%2Fcirros-testvm.git diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/cairo/0001-blackfin-build-fix.patch b/cirros-testvm/src-cirros/buildroot-2015.05/package/cairo/0001-blackfin-build-fix.patch new file mode 100644 index 0000000..0e8dd3a --- /dev/null +++ b/cirros-testvm/src-cirros/buildroot-2015.05/package/cairo/0001-blackfin-build-fix.patch @@ -0,0 +1,55 @@ +Fix build on platforms where __USER_LABEL_PREFIX__ is not empty + +On most platforms, a C language symbol and its assembly equivalent are +identical. However, on the Blackfin architecture, this isn't the case, +the corresponding C language symbol in assembly is prepended with a +"_". Blackfin therefore has __USER_LABEL_PREFIX__ defined to "_". + +Cairo already has some code to cope with __USER_LABEL_PREFIX__, but +this code isn't completely correct: it prepends both assembly symbols +and C symbols with __USER_LABEL_PREFIX__, which cannot work. + +This patch fixes that by using the existing slim_hidden_asmname() to +define assembly symbols, and introduce a new slim_hidden_realname() +for C symbols. + +Signed-off-by: Thomas Petazzoni + +Index: b/src/cairo-compiler-private.h +=================================================================== +--- a/src/cairo-compiler-private.h ++++ b/src/cairo-compiler-private.h +@@ -93,12 +93,13 @@ + __asm__ (slim_hidden_asmname (internal)) + # define slim_hidden_def1(name, internal) \ + extern __typeof (name) EXT_##name __asm__(slim_hidden_asmname(name)) \ +- __attribute__((__alias__(slim_hidden_asmname(internal)))) ++ __attribute__((__alias__(slim_hidden_realname(internal)))) + # define slim_hidden_ulp slim_hidden_ulp1(__USER_LABEL_PREFIX__) + # define slim_hidden_ulp1(x) slim_hidden_ulp2(x) + # define slim_hidden_ulp2(x) #x + # define slim_hidden_asmname(name) slim_hidden_asmname1(name) + # define slim_hidden_asmname1(name) slim_hidden_ulp #name ++# define slim_hidden_realname(name) #name + #else + # define slim_hidden_proto(name) int _cairo_dummy_prototype(void) + # define slim_hidden_proto_no_warn(name) int _cairo_dummy_prototype(void) +Index: b/util/cairo-script/cairo-script-private.h +=================================================================== +--- a/util/cairo-script/cairo-script-private.h ++++ b/util/cairo-script/cairo-script-private.h +@@ -109,12 +109,13 @@ + __asm__ (slim_hidden_asmname (internal)) + # define slim_hidden_def1(name, internal) \ + extern __typeof (name) EXT_##name __asm__(slim_hidden_asmname(name)) \ +- __attribute__((__alias__(slim_hidden_asmname(internal)))) ++ __attribute__((__alias__(slim_hidden_realname(internal)))) + # define slim_hidden_ulp slim_hidden_ulp1(__USER_LABEL_PREFIX__) + # define slim_hidden_ulp1(x) slim_hidden_ulp2(x) + # define slim_hidden_ulp2(x) #x + # define slim_hidden_asmname(name) slim_hidden_asmname1(name) + # define slim_hidden_asmname1(name) slim_hidden_ulp #name ++# define slim_hidden_realname(name) #name + #else + # define slim_hidden_proto(name) int _csi_dummy_prototype(void) + # define slim_hidden_proto_no_warn(name) int _csi_dummy_prototype(void)