Blame SOURCES/0002-xfree86-Link-fb-statically.patch

55d6a0
From c2eb1e2eac99ef0b8e6cf47ab0a94371cf47e939 Mon Sep 17 00:00:00 2001
55d6a0
From: Adam Jackson <ajax@redhat.com>
55d6a0
Date: Tue, 23 Jul 2019 11:54:15 -0400
55d6a0
Subject: [PATCH xserver 02/11] xfree86: Link fb statically
55d6a0
55d6a0
There's no real benefit to leaving this loadable, virtually every driver
55d6a0
is going to load it.
55d6a0
55d6a0
Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
55d6a0
(cherry picked from commit c1703cdf3b0d6663fcac68598eefe324ae4e1e71)
55d6a0
---
55d6a0
 hw/xfree86/Makefile.am                     |  1 +
55d6a0
 hw/xfree86/dixmods/Makefile.am             |  8 +-------
55d6a0
 hw/xfree86/dixmods/meson.build             | 14 --------------
55d6a0
 hw/xfree86/drivers/modesetting/meson.build |  1 -
55d6a0
 hw/xfree86/loader/loadmod.c                |  1 +
55d6a0
 hw/xfree86/meson.build                     |  1 +
55d6a0
 hw/xfree86/sdksyms.sh                      |  6 +++---
55d6a0
 test/Makefile.am                           |  1 +
55d6a0
 8 files changed, 8 insertions(+), 25 deletions(-)
55d6a0
55d6a0
diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
55d6a0
index 9aeaea1a6..1d494cd0f 100644
55d6a0
--- a/hw/xfree86/Makefile.am
55d6a0
+++ b/hw/xfree86/Makefile.am
55d6a0
@@ -75,6 +75,7 @@ LOCAL_LIBS = \
55d6a0
             $(DRI2_LIB) \
55d6a0
 	    $(DRI3_LIB) \
55d6a0
 	    $(GLXVND_LIB) \
55d6a0
+	    $(top_builddir)/fb/libfb.la \
55d6a0
 	    $(top_builddir)/miext/sync/libsync.la \
55d6a0
             $(top_builddir)/mi/libmi.la \
55d6a0
             $(top_builddir)/os/libos.la \
55d6a0
diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am
55d6a0
index 856659f98..a1f97056a 100644
55d6a0
--- a/hw/xfree86/dixmods/Makefile.am
55d6a0
+++ b/hw/xfree86/dixmods/Makefile.am
55d6a0
@@ -4,8 +4,7 @@ if GLX
55d6a0
 GLXMODS = libglx.la
55d6a0
 endif
55d6a0
 
55d6a0
-module_LTLIBRARIES = libfb.la \
55d6a0
-                     libwfb.la \
55d6a0
+module_LTLIBRARIES = libwfb.la \
55d6a0
                      libshadow.la
55d6a0
 
55d6a0
 extsmoduledir = $(moduledir)/extensions
55d6a0
@@ -17,11 +16,6 @@ AM_CPPFLAGS = @XORG_INCS@ \
55d6a0
            -I$(top_srcdir)/miext/shadow \
55d6a0
            -I$(top_srcdir)/glx
55d6a0
 
55d6a0
-libfb_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
55d6a0
-libfb_la_LIBADD = $(top_builddir)/fb/libfb.la
55d6a0
-libfb_la_SOURCES = fbmodule.c
55d6a0
-libfb_la_CFLAGS = $(AM_CFLAGS)
55d6a0
-
55d6a0
 libwfb_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
55d6a0
 libwfb_la_LIBADD = $(top_builddir)/fb/libwfb.la
55d6a0
 libwfb_la_SOURCES = fbmodule.c
55d6a0
diff --git a/hw/xfree86/dixmods/meson.build b/hw/xfree86/dixmods/meson.build
55d6a0
index 0562b630f..e4ac02228 100644
55d6a0
--- a/hw/xfree86/dixmods/meson.build
55d6a0
+++ b/hw/xfree86/dixmods/meson.build
55d6a0
@@ -1,17 +1,3 @@
55d6a0
-fb = shared_module(
55d6a0
-    'fb',
55d6a0
-    'fbmodule.c',
55d6a0
-
55d6a0
-    include_directories: [inc, xorg_inc],
55d6a0
-    c_args: xorg_c_args,
55d6a0
-    dependencies: common_dep,
55d6a0
-    link_whole: libxserver_fb,
55d6a0
-    link_with: e,
55d6a0
-
55d6a0
-    install: true,
55d6a0
-    install_dir: module_dir,
55d6a0
-)
55d6a0
-
55d6a0
 shared_module(
55d6a0
     'wfb',
55d6a0
     'fbmodule.c',
55d6a0
diff --git a/hw/xfree86/drivers/modesetting/meson.build b/hw/xfree86/drivers/modesetting/meson.build
55d6a0
index 5e13f1a53..02852a716 100644
55d6a0
--- a/hw/xfree86/drivers/modesetting/meson.build
55d6a0
+++ b/hw/xfree86/drivers/modesetting/meson.build
55d6a0
@@ -30,7 +30,6 @@ shared_module(
55d6a0
 xorg_build_root = join_paths(meson.build_root(), 'hw', 'xfree86')
55d6a0
 symbol_test_args = []
55d6a0
 symbol_test_args += join_paths(xorg_build_root, 'libxorgserver.so')
55d6a0
-symbol_test_args += join_paths(xorg_build_root, 'dixmods', 'libfb.so')
55d6a0
 symbol_test_args += join_paths(xorg_build_root, 'dixmods', 'libshadow.so')
55d6a0
 if gbm_dep.found()
55d6a0
     symbol_test_args += join_paths(xorg_build_root, 'glamor_egl', 'libglamoregl.so')
55d6a0
diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
55d6a0
index a6356bd8f..f0983b2f8 100644
55d6a0
--- a/hw/xfree86/loader/loadmod.c
55d6a0
+++ b/hw/xfree86/loader/loadmod.c
55d6a0
@@ -621,6 +621,7 @@ DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent)
55d6a0
 
55d6a0
 static const char *compiled_in_modules[] = {
55d6a0
     "ddc",
55d6a0
+    "fb",
55d6a0
     "i2c",
55d6a0
     "ramdac",
55d6a0
     "dbe",
55d6a0
diff --git a/hw/xfree86/meson.build b/hw/xfree86/meson.build
55d6a0
index cacf56d4c..c80964ea4 100644
55d6a0
--- a/hw/xfree86/meson.build
55d6a0
+++ b/hw/xfree86/meson.build
55d6a0
@@ -61,6 +61,7 @@ xorg_link = [
55d6a0
     xorg_os_support,
55d6a0
     xorg_parser,
55d6a0
     xorg_ramdac,
55d6a0
+    libxserver_fb,
55d6a0
     libxserver_xext_vidmode,
55d6a0
     libxserver_main,
55d6a0
     libxserver_config,
55d6a0
diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh
55d6a0
index 7897aae22..2ebc4c019 100755
55d6a0
--- a/hw/xfree86/sdksyms.sh
55d6a0
+++ b/hw/xfree86/sdksyms.sh
55d6a0
@@ -21,13 +21,13 @@ cat > sdksyms.c << EOF
55d6a0
 #include "picturestr.h"
55d6a0
 
55d6a0
 
55d6a0
-/* fb/Makefile.am -- module */
55d6a0
-/*
55d6a0
+/* fb/Makefile.am */
55d6a0
 #include "fb.h"
55d6a0
 #include "fbrop.h"
55d6a0
 #include "fboverlay.h"
55d6a0
-#include "wfbrename.h"
55d6a0
 #include "fbpict.h"
55d6a0
+/* wfb is still a module
55d6a0
+#include "wfbrename.h"
55d6a0
  */
55d6a0
 
55d6a0
 
55d6a0
diff --git a/test/Makefile.am b/test/Makefile.am
55d6a0
index 12ac327a3..ce07c3551 100644
55d6a0
--- a/test/Makefile.am
55d6a0
+++ b/test/Makefile.am
55d6a0
@@ -146,6 +146,7 @@ tests_LDADD += \
55d6a0
             $(top_builddir)/hw/xfree86/i2c/libi2c.la \
55d6a0
             $(top_builddir)/hw/xfree86/xkb/libxorgxkb.la \
55d6a0
             $(top_builddir)/Xext/libXvidmode.la \
55d6a0
+            $(top_builddir)/fb/libfb.la \
55d6a0
             $(XSERVER_LIBS) \
55d6a0
             $(XORG_LIBS)
55d6a0
 
55d6a0
-- 
55d6a0
2.33.1
55d6a0