From 6665b71b22c265a318ff76178cc27732512791a8 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 27 Sep 2013 14:22:59 -0700 Subject: i915: Build the driver into the shared mesa_dri_drivers.so. i915 has symbols for formerly-shared code that conflict with i965, so we define them away using gen-symbol-redefs.py. Options considered: - This option. Downsides: The symbols in profiling and debugging don't match the source. The symbol list may change in the future and we won't notice without manually running the tool again. - Use objcopy --localize-hidden to automatically demote our symbols to locals. This didn't work on i965 due to c++ weak symbols (which can't be localized), but could work on i915. We could do it on i915 only, but it does produce libtool warnings at link time due to libtool not knowing if the resulting .o file is safe to link (stupid libtool). Plus you end up with different symbols of the same name, which is confusing for debugging too. On the other hand, no future symbol conflicts long term. - Write our own libelf tool that handles c++ weak symbols like we want and apply it to all drivers. All the downsides of above, but applies uniformly across drivers. - Edit the files to just rename all the i915 or i965 symbols that conflict. There are on the order of 100 that have a prefix we used to share, so it would take a bit of typing. Fewest downsides, but still can have conflicts long term. Ultimately, this is the least invasive change at the moment, and we can see if the "more symbol conflicts appear later" thing is a real concern or not. Note that the ability to compile a version of i915 without INTEL_DEBUG env support is dropped. It's too useful. v2: drop dridir now that it's unused. v3: Consistently put spaces around += in the updated Makefile.am block. v4: Set a global driverAPI variable so loaders don't have to update to createNewScreen2() (though they may want to for thread safety). Reviewed-by: Matt Turner (v2) Reviewed-by: Emil Velikov --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index c352cf5a536..2fcfd68faa2 100644 --- a/configure.ac +++ b/configure.ac @@ -1039,7 +1039,7 @@ fi enable_dricore=no enable_megadriver=no for driver in $DRI_DIRS; do - if test $driver != "i965" -a $driver != "nouveau"; then + if test $driver != "i965" -a $driver != "nouveau" -a $driver != "i915"; then enable_dricore=yes else enable_megadriver=yes -- cgit v1.2.3