mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-06-16 08:38:28 +02:00
Fix the AMD64 final link by removing SLIM from pixman
In order for SLIM's PLT indirection avoidance to work, everything in the library that makes internal function calls needs to see the relevant slim_hidden_proto() macro in addition to the function's prototype. However, external headers used by clients of the shared library should not use the SLIM macros at all. Pixman is a rather odd case -- it's mostly independent from cairo, so it has it's own public interface, but it's built as a part of cairo instead of its own shared library. This means that cairo would need to see all of pixman's slim_hidden_proto() macros in order to function and it doesn't currently, which results in a link failure on AMD64 systems and on i386 systems (I think, I haven't actually verified this) it produces a shared object that isn't actally sharable. I have no idea why exactly the link failure only showed up as a result of commite06246b9b1. I think it has something to do with the pixman functions no longer having PLT entries at all, but the exact interaction isn't clear to me. However, all of these pixman functions aren't part of the cairo ABI (which is why they were marked pixman_private in the first place), which means that the SLIMification of pixman is largely pointless -- they aren't externally visible, so they don't need PLT entries at all. Furthermore, while pixman may eventually be shared among cairo and X, I'm told that this sharing will be source-level only, which means it won't ever be an actual shared library and thus won't ever need SLIM at all. So, I just removed all use of SLIM in pixman (leaving behind slim_internal.h for the future edification of anyone who cares).This fixes the AMD64 link failure and passes the check-plt & check-def parts of make check. Signed-off-by: Nicholas Miell <nmiell@gmail.com> (cherry picked fromd598cd8d61commit)
This commit is contained in:
parent
bd8790bbc5
commit
d4793cb997
7 changed files with 0 additions and 29 deletions
|
|
@ -1902,7 +1902,6 @@ pixman_composite (pixman_operator_t op,
|
|||
}
|
||||
pixman_region_destroy (region);
|
||||
}
|
||||
slim_hidden_def(pixman_composite);
|
||||
|
||||
/* The CPU detection code needs to be in a file not compiled with
|
||||
* "-mmmx -msse", as gcc would generate CMOV instructions otherwise
|
||||
|
|
|
|||
|
|
@ -53,7 +53,6 @@ pixman_color_to_pixel (const pixman_format_t *format,
|
|||
a = a << format->alpha;
|
||||
*pixel = r|g|b|a;
|
||||
}
|
||||
slim_hidden_def(pixman_color_to_pixel);
|
||||
|
||||
static uint16_t
|
||||
FbFillColor (uint32_t pixel, int bits)
|
||||
|
|
|
|||
|
|
@ -171,7 +171,6 @@ pixman_format_init (pixman_format_t *format, int format_code)
|
|||
(format->blueMask << format->blue) |
|
||||
(format->greenMask << format->green));
|
||||
}
|
||||
slim_hidden_def(pixman_format_init);
|
||||
|
||||
void
|
||||
pixman_format_destroy (pixman_format_t *format)
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ pixman_image_create (pixman_format_t *format,
|
|||
|
||||
return image;
|
||||
}
|
||||
slim_hidden_def(pixman_image_create);
|
||||
|
||||
pixman_image_t *
|
||||
pixman_image_create_for_data (FbBits *data, pixman_format_t *format, int width, int height, int bpp, int stride)
|
||||
|
|
@ -369,7 +368,6 @@ pixman_image_set_component_alpha (pixman_image_t *image,
|
|||
if (image)
|
||||
image->componentAlpha = component_alpha;
|
||||
}
|
||||
slim_hidden_def(pixman_image_set_component_alpha);
|
||||
|
||||
int
|
||||
pixman_image_set_transform (pixman_image_t *image,
|
||||
|
|
@ -412,7 +410,6 @@ pixman_image_set_repeat (pixman_image_t *image,
|
|||
if (image)
|
||||
image->repeat = repeat;
|
||||
}
|
||||
slim_hidden_def(pixman_image_set_repeat);
|
||||
|
||||
void
|
||||
pixman_image_set_filter (pixman_image_t *image,
|
||||
|
|
@ -505,7 +502,6 @@ pixman_image_destroy (pixman_image_t *image)
|
|||
|
||||
free (image);
|
||||
}
|
||||
slim_hidden_def(pixman_image_destroy);
|
||||
|
||||
void
|
||||
pixman_image_destroyClip (pixman_image_t *image)
|
||||
|
|
|
|||
|
|
@ -33,8 +33,6 @@
|
|||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "slim_internal.h"
|
||||
|
||||
#ifndef __GNUC__
|
||||
#define __inline
|
||||
#endif
|
||||
|
|
@ -852,17 +850,6 @@ pixman_private int
|
|||
pixman_transform_point (pixman_transform_t *transform,
|
||||
pixman_vector_t *vector);
|
||||
|
||||
/* Avoid unnessecary PLT entries. */
|
||||
|
||||
slim_hidden_proto(pixman_image_create)
|
||||
slim_hidden_proto(pixman_color_to_pixel)
|
||||
slim_hidden_proto(pixman_format_init)
|
||||
slim_hidden_proto(pixman_image_destroy)
|
||||
slim_hidden_proto(pixman_fill_rectangles)
|
||||
slim_hidden_proto(pixman_image_set_component_alpha)
|
||||
slim_hidden_proto(pixman_image_set_repeat)
|
||||
slim_hidden_proto(pixman_composite)
|
||||
|
||||
#include "icrop.h"
|
||||
|
||||
/* XXX: For now, I'm just wholesale pasting Xserver/render/picture.h here: */
|
||||
|
|
|
|||
|
|
@ -363,4 +363,3 @@ bail1:
|
|||
;
|
||||
}
|
||||
}
|
||||
slim_hidden_def(pixman_fill_rectangles);
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ SOFTWARE.
|
|||
#include <string.h>
|
||||
|
||||
#include "pixregionint.h"
|
||||
#include "slim_internal.h"
|
||||
|
||||
#if defined (__GNUC__) && !defined (NO_INLINES)
|
||||
#define INLINE __inline
|
||||
|
|
@ -89,10 +88,6 @@ pixman_init (pixman_region16_t *region, pixman_box16_t *rect);
|
|||
static void
|
||||
pixman_uninit (pixman_region16_t *region);
|
||||
|
||||
slim_hidden_proto(pixman_region_create_simple)
|
||||
slim_hidden_proto(pixman_region_copy)
|
||||
slim_hidden_proto(pixman_region_union)
|
||||
|
||||
/*
|
||||
* The functions in this file implement the Region abstraction used extensively
|
||||
* throughout the X11 sample server. A Region is simply a set of disjoint
|
||||
|
|
@ -327,7 +322,6 @@ pixman_region_create_simple (pixman_box16_t *extents)
|
|||
|
||||
return region;
|
||||
}
|
||||
slim_hidden_def(pixman_region_create_simple);
|
||||
|
||||
/*****************************************************************
|
||||
* RegionInit(pReg, rect, size)
|
||||
|
|
@ -452,7 +446,6 @@ pixman_region_copy(pixman_region16_t *dst, pixman_region16_t *src)
|
|||
dst->data->numRects * sizeof(pixman_box16_t));
|
||||
return PIXMAN_REGION_STATUS_SUCCESS;
|
||||
}
|
||||
slim_hidden_def(pixman_region_copy);
|
||||
|
||||
/*======================================================================
|
||||
* Generic Region Operator
|
||||
|
|
@ -1232,7 +1225,6 @@ pixman_region_union(pixman_region16_t *newReg, pixman_region16_t *reg1, pixman_r
|
|||
good(newReg);
|
||||
return PIXMAN_REGION_STATUS_SUCCESS;
|
||||
}
|
||||
slim_hidden_def(pixman_region_union);
|
||||
|
||||
/*======================================================================
|
||||
* Batch Rectangle Union
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue