17915870 clean up check_rtime & ld guidance warnings in X gate
15740716 SUNBT7088708 Erroneous RPATH and RUNPATH in pkg:x11/server/xorg/driver/xorg-efb
18099386 X builds on s12_38 report 418 check_rtime errors
19509967 After 19229055, X consolidation has check_rtime failures
20484350 cleanup assorted build & check warnings
--- a/buildit Mon Nov 11 14:46:00 2013 -0800
+++ b/buildit Sat Mar 14 12:06:11 2015 -0700
@@ -1,11 +1,11 @@
#!/bin/ksh93
#
# buildit
-# Script for building OpenSolaris X Consolidation
+# Script for building Solaris X Consolidation
#
###########################################################################
#
-# Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -37,6 +37,9 @@
PATH=/usr/bin:${PATH}:/usr/gnu/bin:/usr/sbin
export PATH
+# Ensure mkdir sets expected permissions for directories in proto area
+umask 022
+
progname="$0"
function fatal_error
{
@@ -125,6 +128,7 @@
"proto/pkg_${MACH}" "proto/tools_${MACH}"
${XMAKE} clobber
+mkdir -p proto
# Generate source release while tree is in clean state, but ensure we have all
# the required tarballs for both platforms, (and no extras/old ones) first.
--- a/exception_lists/check_rtime Mon Nov 11 14:46:00 2013 -0800
+++ b/exception_lists/check_rtime Sat Mar 14 12:06:11 2015 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -50,60 +50,62 @@
NOSYMSORT usr/bin/vncpasswd
NOSYMSORT usr/bin/vncviewer
NOSYMSORT usr/bin/x0vncserver
-NOSYMSORT usr/lib/MACH(mesa)/libGL.so.1
-#
+NOSYMSORT usr/lib/MACH(mesa)/libdricore.*\.so\.1.*
+NOSYMSORT usr/lib/MACH(mesa)/libGL\.so\.1.*
+NOSYMSORT usr/lib/MACH(mesa)/libGLU\.so\.1.*
+NOSYMSORT usr/lib/xorg/modules/MACH(dri)/i965_dri\.so
+
+# Loadable modules without dependencies on other modules may have no direct
+# bindings
+NODIRECT ^usr/lib/mesa/modules/.*$
+NODIRECT ^usr/lib/xorg/modules/.*$
+
# Unreferenced object of X objects we can't change for specific reasons
# - Old versions of Java rely on this dependency, even though it forms a
-# loop in the dependency graph, so we can't remove it (see CR 6192234)
+# loop in the dependency graph, so we can't remove it (see Bug 15235619)
UNREF_OBJ /libXext\.so\.0;\ unused\ dependency\ of .*/libX11\.so\.4
#
# Unreferenced objects of objects from other consolidations
UNREF_OBJ /lib.*\ of\ .*libgnutls\.so\.26
-UNREF_OBJ /lib.*\ of\ .*libnvidia-tls\.so\.1
UNREF_OBJ /lib.*\ of\ .*libstdcxx4\.so\.4
-UNREF_OBJ /libdl\.so\.1;.*\ of\ .*libXm\.so\.4
+
#
# Unused runpaths due to use of both relative & absolute paths
UNUSED_RPATH /usr/lib/xorg.*\ from\ .*/mkfontscale
#
# Unused runpaths in objects from other consolidations
UNUSED_RPATH /usr/dt/lib.*\ from\ .*libXm\.so\.4
-UNUSED_RPATH /usr/lib.*\ from\ .*libgcc_s\.so\.1
-UNUSED_RPATH /usr/ccs/lib.*\ from\ .*libgcc_s\.so\.1
-UNUSED_RPATH /usr/sfw/lib.*\ from\ .*libgcc_s\.so\.1
-UNUSED_RPATH /usr/lib.*\ from\ .*libstdc\+\+\.so\.6
-UNUSED_RPATH /usr/ccs/lib.*\ from\ .*libstdc\+\+\.so\.6
+UNUSED_RPATH /usr/lib.*\ from\ .*libcairo\.so\.2
UNUSED_RPATH /opt/VRTSvxvm/lib.*\ from\ .*libdiskmgt\.so\.1
#
+# Ancient non-thread-safe version of libXaw that was EOF'ed in S12
+ERRNO ^usr/lib/libXaw\.so\.4$
+
+# Since we're not in ON, elfsigning happens at RE dock integration,
+# not during the build process.
+NOELFSIGN .*
+
+# check_rtime tests for the DT_SUNW_NXHEAP dynamic entry, as defined by
+# PSARC/2014/247 Non-executable stack and heap security extensions - 19229055
+# provide a blanket exemption for now
+EXEC_HEAP .*
+
## Things we might be able to fix eventually, but not today:
#
-# libXinerama only uses libc for malloc() - when linked with synergyc &
+# libXinerama & libXss only use libc for malloc() - when linked with synergyc &
# synergys, which get malloc from libumem via libstdcxx4, libc appears unused.
-UNREF_OBJ /libc.so.1;.*\ of\ .*/usr/lib/libXinerama\.so\.1
-#
-# Unused runpaths due to libtool forcing the target directory into the runpath
-UNUSED_RPATH /usr/lib/xorg.*\ from\ .*libdrm.so.2
-UNUSED_RPATH /usr/lib/xorg.*\ from\ .*libfontenc.so.1
-UNUSED_RPATH /usr/lib/X11/MACH(locale)/common.*\ from\ .*/common/.*\.so\.2
-UNUSED_RPATH /usr/lib/X11/xdm.*\ from\ .*libXdmGreet.so
-#
-# gcc adds several directories to the runpath automatically
-UNUSED_RPATH /MACH(lib).* from\ .*/libGL.*.so.1
-UNUSED_RPATH /usr/MACH(lib).* from\ .*/libGL.*.so.1
-UNUSED_RPATH /MACH(lib).* from\ .*/lib.*XvMC.so.1
-UNUSED_RPATH /usr/MACH(lib).* from\ .*/lib.*XvMC.so.1
-UNUSED_RPATH /usr/ccs/MACH(lib).* from\ .*/lib.*XvMC.so.1
-UNUSED_RPATH /usr/sfw/MACH(lib).* from\ .*/lib.*XvMC.so.1
-UNUSED_RPATH /MACH(lib).* from\ .*/usr/lib/xorg/modules/.*.so
-UNUSED_RPATH /usr/MACH(lib).* from\ .*/usr/lib/xorg/modules/.*.so
-UNUSED_RPATH /usr/sfw/MACH(lib).* from\ .*/usr/lib/xorg/modules/.*.so
-UNUSED_RPATH /MACH(lib).* from\ .*/usr/lib/xorg/vmmouse_detect
-UNUSED_RPATH /usr/MACH(lib).* from\ .*/usr/lib/xorg/vmmouse_detect
-UNUSED_RPATH /usr/sfw/MACH(lib).* from\ .*/usr/lib/xorg/vmmouse_detect
-#
+UNREF_OBJ /libc\.so\.1;.*\ of\ .*/usr/MACH(lib)/libXinerama\.so\.1
+UNREF_OBJ /libc\.so\.1;.*\ of\ .*/usr/lib/64/libXss\.so\.1
+
+# The Solaris 12 linker drops this with -zdiscard-unused=dependencies
+# but that fix hasn't been backported to Solaris 11 yet.
+UNREF_OBJ /libX11\.so\.4;\ unused\ dependency\ of .*/libX11-xcb\.so\.1
+
# Issues caused by having to pass a single set of linker flags to module
# configure scripts/Makefiles used to build a mixed bag of objects
-UNUSED_RPATH /MACH(lib).*\ from\ .*/usr/lib/xorg/synclient
-UNUSED_RPATH /MACH(lib).*\ from\ .*/usr/lib/xorg/syndaemon
-UNUSED_RPATH /usr/lib/xorg.*\ from\ .*/usr/lib/xorg/modules/.*\.so
-UNUSED_RPATH /usr/lib/fbconfig.*\ from\ .*/usr/lib/fbconfig/.*\.so
+UNUSED_RPATH /usr/lib/xorg.*\ from\ .*/usr/bin/intel_.*
+UNUSED_RPATH /usr/lib/xorg.*\ from\ .*/usr/lib/mesa/.*\.so.*
+UNUSED_RPATH /usr/lib/xorg.*\ from\ .*/usr/lib/MACH(xorg)/libdrm\.so\.2
+UNUSED_RPATH /usr/lib/xorg.*\ from\ .*/usr/lib/xorg/modules/MACH(dri)/swrast_dri\.so
+UNREF_OBJ /usr/lib/.*libCstd\.so\.1;.*\ of\ .*/usr/bin/vncconfig
+UNREF_OBJ /usr/lib/.*libCstd\.so\.1;.*\ of\ .*/usr/bin/vncpasswd
--- a/exception_lists/packaging Mon Nov 11 14:46:00 2013 -0800
+++ b/exception_lists/packaging Sat Mar 14 12:06:11 2015 -0700
@@ -80,12 +80,6 @@
usr/lib/python2.7/vendor-packages/xcbgen/state.pyo
usr/lib/python2.7/vendor-packages/xcbgen/xtypes.pyo
-# No need to deliver libchromeXvMC.so since it requires DRI which we don't build with
-usr/lib/libchromeXvMC.so i386
-usr/lib/libchromeXvMC.so.1 i386
-usr/lib/libchromeXvMCPro.so i386
-usr/lib/libchromeXvMCPro.so.1 i386
-
# No need to deliver libdrm_radeon on sparc
usr/lib/xorg/libdrm_radeon.so sparc
usr/lib/xorg/libdrm_radeon.so.1 sparc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/exception_lists/permchk Sat Mar 14 12:06:11 2015 -0700
@@ -0,0 +1,38 @@
+#
+# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+#
+############################################################################
+# This file lists which files in the X gate should not trigger a warning from
+# 'hg permchk', 'hg nits', or 'hg pbchk' about being executable
+
+# Use shell style pattern globbing for this file
+syntax: glob
+
+buildit
+download-tarballs
+make_release_packages
+open-src/common/*.pl
+open-src/common/install-sh
+open-src/util/build-tools/find-build-errors
+open-src/util/build-tools/xmake
+pkg/*.pl
+
--- a/open-src/app/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/app/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -106,7 +106,6 @@
xmakemap \
xman \
xmodmap \
- xpm \
xpr \
xprop \
xrandr \
@@ -133,6 +132,7 @@
OBSOLETE_SUBDIRS = \
rstart \
xplsprinters \
+ xpm \
xprehashprinterlist \
xrx \
xscreensaver \
--- a/open-src/app/bitmap/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/app/bitmap/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -58,6 +58,6 @@
# ignore some unneeded dependencies that upstream includes:
# unreferenced object=/usr/lib/libXt.so.4; unused dependency of /usr/bin/bmtoa
# unreferenced object=/usr/lib/libX11.so.4; unused dependency of /usr/bin/bmtoa
-MODULE_LDFLAGS = -z ignore
+MODULE_LDFLAGS = $(ZDISCARD_UNUSED_DEP)
include ../Makefile.inc
--- a/open-src/app/gfx-utils/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/app/gfx-utils/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -70,6 +70,9 @@
MODULE_BUILD_ENV = $(CONFIG_ENV) PREFIX=$(MODULE_PREFIX)
MODULE_CONFIG_ENV = LIB_LDFLAGS="$(LIB_LDFLAGS)"
+# Allow linker to skip linking to libm if compiler inlined all math functions
+MODULE_LD_OPTIONS = $(ZDISCARD_UNUSED_DEP)
+
include ../Makefile.inc
# Install metadata for fb-specific packages too
--- a/open-src/app/gfx-utils/sun-src/fbconf_xorg/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/app/gfx-utils/sun-src/fbconf_xorg/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -3,7 +3,7 @@
#
#
-# Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -46,7 +46,7 @@
# Linker flags
#
-LIBS = -L$(BIN_DIR) -l$(L_FBC) -L$(GFX_BIN_DIR) -lgfx
+LIBS = $(L_FBC)
#
# Code modules
@@ -102,11 +102,8 @@
all: init $(TARGETS)
-$(BIN_DIR)/$(BIN): $(BIN_OBJS) $(BIN_DIR)/$(LIB_FBC_SO)$(VERS) $(GFX_BIN_DIR)/$(LIB_GFX_A)
- $(CC) -o $@ $(BIN_OBJS) $(LDFLAGS) $(LIBS) $(DYNFLAGS)
-
-$(GFX_BIN_DIR)/$(LIB_GFX_A): Makefile.gfx
- $(MAKE) -f Makefile.gfx all
+$(BIN_DIR)/$(BIN): $(BIN_OBJS) $(BIN_DIR)/$(LIB_FBC_SO)$(VERS)
+ $(CC) -o $@ $(BIN_OBJS) $(LDFLAGS) $(LIBS)
$(BIN_DIR)/$(LIB_FBC_SO)$(VERS): Makefile.fbc
$(MAKE) -f Makefile.fbc all
@@ -142,7 +139,6 @@
$(MKDIR) -p $(BIN_DIR)
clean:
- $(MAKE) -f Makefile.gfx clean
$(MAKE) -f Makefile.xf86 clean
$(MAKE) -f Makefile.fbc clean
$(MAKE) -f Makefile.efb clean
@@ -151,14 +147,12 @@
-rm -f $(BIN_OBJS) $(FBC_SRC_DIR)/*~ *~
clobber: clean
- $(MAKE) -f Makefile.gfx clobber
$(MAKE) -f Makefile.xf86 clobber
$(MAKE) -f Makefile.fbc clobber
$(MAKE) -f Makefile.efb clobber
$(MAKE) -f Makefile.ast clobber
$(MAKE) -f Makefile.mga clobber
rm -f $(BIN_DIR)/$(BIN)
- rm -rf $(BIN_DIR)
# End of Makefile
--- a/open-src/app/gfx-utils/sun-src/fbconf_xorg/Makefile.ast Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/app/gfx-utils/sun-src/fbconf_xorg/Makefile.ast Sat Mar 14 12:06:11 2015 -0700
@@ -3,7 +3,7 @@
#
#
-# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -48,7 +48,7 @@
# Linker flags
#
-LIBS = -L$(BIN_DIR) -l$(L_FBC)
+LIBS = $(L_FBC)
#
--- a/open-src/app/gfx-utils/sun-src/fbconf_xorg/Makefile.common Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/app/gfx-utils/sun-src/fbconf_xorg/Makefile.common Sat Mar 14 12:06:11 2015 -0700
@@ -3,7 +3,7 @@
#
#
-# Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -41,27 +41,18 @@
VERS = .1
-L_GFX = gfx
+L_GFX = -L$(GFX_BIN_DIR) -lgfx
LIB_GFX_A = libgfx.a
-L_XF86 = xf86conf
+L_XF86 = -L$(XF86_BIN_DIR) -lxf86conf
LIB_XF86_A = libxf86conf.a
-L_FBC = $(BIN)
-LIB_FBC = lib$(L_FBC)
-LIB_FBC_SO = $(LIB_FBC).so
-
-L_EFB = SUNWefb_conf
-LIB_EFB = lib$(L_EFB)
-LIB_EFB_SO = $(LIB_EFB).so
+L_FBC = -L$(BIN_DIR) -R$(INSTALL_LIB_DIR) -lfbconf_xorg
+LIB_FBC_SO = libfbconf_xorg.so
-L_AST = SUNWast_conf
-LIB_AST = lib$(L_AST)
-LIB_AST_SO = $(LIB_AST).so
-
-L_MGA = SUNWmga_conf
-LIB_MGA = lib$(L_MGA)
-LIB_MGA_SO = $(LIB_MGA).so
+LIB_EFB_SO = libSUNWefb_conf.so
+LIB_AST_SO = libSUNWast_conf.so
+LIB_MGA_SO = libSUNWmga_conf.so
#
@@ -115,19 +106,16 @@
DEBUG_FLAG=
PIC_FLAG = -xcode=pic32 # Needed with dynamic linking
CFLAGS += $(DEBUG_FLAG) $(PIC_FLAG)
+CFLAGS += $(CPPFLAGS)
#
# Linker flags
#
-DYNFLAGS = -lc
-DYNFLAGS += -Wl,-R$(INSTALL_LIB_DIR)
-
DYNLIBFLAGS = -lc
DYNLIBFLAGS += -G
-DYNLIBFLAGS += -Wl,-L$(INSTALL_LIB_DIR)
-DYNLIBFLAGS += -Wl,-R$(INSTALL_LIB_DIR)
+DYNLIBFLAGS += -h $(@F)
# End of Makefile.common
--- a/open-src/app/gfx-utils/sun-src/fbconf_xorg/Makefile.efb Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/app/gfx-utils/sun-src/fbconf_xorg/Makefile.efb Sat Mar 14 12:06:11 2015 -0700
@@ -3,7 +3,7 @@
#
#
-# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -46,7 +46,7 @@
# Linker flags
#
-LIBS = -L$(BIN_DIR) -l$(L_FBC)
+LIBS = $(L_FBC)
#
--- a/open-src/app/gfx-utils/sun-src/fbconf_xorg/Makefile.fbc Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/app/gfx-utils/sun-src/fbconf_xorg/Makefile.fbc Sat Mar 14 12:06:11 2015 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -46,10 +46,7 @@
# Linker flags
#
-LIBS = -L$(XF86_BIN_DIR) -l$(L_XF86) -L$(GFX_BIN_DIR) -lgfx
-# -z ignore since optimized builds may inline all needed libm functions
-LIBS += -z ignore -lm
-
+LIBS = $(L_XF86) $(L_GFX) -lm
#
# Code modules
--- a/open-src/app/gfx-utils/sun-src/fbconf_xorg/Makefile.mga Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/app/gfx-utils/sun-src/fbconf_xorg/Makefile.mga Sat Mar 14 12:06:11 2015 -0700
@@ -3,7 +3,7 @@
#
#
-# Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -48,7 +48,7 @@
# Linker flags
#
-LIBS = -L$(BIN_DIR) -l$(L_FBC)
+LIBS = $(L_FBC)
#
--- a/open-src/app/gfx-utils/sun-src/fbconfig/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/app/gfx-utils/sun-src/fbconfig/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -31,6 +31,7 @@
INCPATHS=-I../gfx_common/include
CFLAGS += $(INCPATHS)
+CFLAGS += $(CPPFLAGS)
LIBPATHS=-lscf
@@ -52,6 +53,7 @@
-rm -f $(BIN)
install: all
+ -mkdir -p $(INSTALL_BIN_DIR)
$(INSTALL) -m 0555 $(BIN) $(INSTALL_BIN_DIR)
$(INSTALL) -m 0444 exec_attr $(DESTDIR)/etc/security/exec_attr.d/fbconfig
--- a/open-src/app/intel-gpu-tools/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/app/intel-gpu-tools/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -54,6 +54,9 @@
MODULE_COMPILER=gcc
MODULE_COMPILER_SET=yes
+# Different programs need different libraries, but upstream links them all in
+MODULE_LD_OPTIONS = $(ZDISCARD_UNUSED_DEP)
+
# Override default config environment - if PYTHON is set to a specific version
# then configure will complain it's version is not >= 3, but if it's unset it's
# fine with not finding a python version >= 3.
--- a/open-src/app/lbxproxy/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/app/lbxproxy/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -2,7 +2,7 @@
#
# lbxproxy - Low Bandwidth X (LBX) proxy
#
-# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -58,6 +58,4 @@
MODULE_LDFLAGS = -lz
-MODULE_CONFIG_OPTS = --sysconfdir=/etc
-
include ../Makefile.inc
--- a/open-src/app/listres/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/app/listres/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -55,6 +55,6 @@
# pkg-config dependencies cause a link to libX11 to be brought in that we
# can ignore
-MODULE_LDFLAGS = -z ignore
+MODULE_LDFLAGS = $(ZDISCARD_UNUSED_DEP)
include ../Makefile.inc
--- a/open-src/app/mesa-demos/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/app/mesa-demos/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -77,25 +77,25 @@
### Rules specific to this directory:
# Only care about building X demos
-DEMO_LDFLAGS=$(PROG_LDFLAGS) -L$(PROTODIR)$(X11_LIB_DIR)$(ARCHLIBSUBDIR) \
- -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) -z ignore
+DEMO_LDFLAGS = $(PROG_LDFLAGS) -L$(PROTODIR)$(X11_LIB_DIR)$(ARCHLIBSUBDIR) \
+ -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR)
+MODULE_LD_OPTIONS = $(ZDISCARD_UNUSED_DEP)
# Flags passed on make command line when building
MODULE_BUILD_MAKEFLAGS = LDFLAGS="$(DEMO_LDFLAGS)"
+DEMO_BUILD_COMMAND = $(DEFAULT_BUILD_COMMAND:@DIR@=$(DEMOS_DIR))
+
# Build Mesa demos
$(GLXGEARS_BIN): $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
- (cd $(DEMOS_DIR) && \
- $(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS) glxgears )
+ $(DEMO_BUILD_COMMAND) glxgears
$(GLXINFO_BIN): $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
- (cd $(DEMOS_DIR) && \
- $(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS) glxinfo )
+ $(DEMO_BUILD_COMMAND) glxinfo
# For testing - we don't ship the rest of these
all-xdemos_gen: $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
- (cd $(DEMOS_DIR) && \
- $(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
+ $(DEMO_BUILD_COMMAND)
all-xdemos:
$(MAKE) $(MAKEFLAGS) $(BUILD_64_FLAGS) all-xdemos_gen
--- a/open-src/app/proxymngr/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/app/proxymngr/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -2,7 +2,7 @@
#
# proxymngr - X11 proxy manager service
#
-# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -62,11 +62,7 @@
# ignore some unneeded dependencies that upstream includes:
# unreferenced object=libX11.so.4; unused dependency of /usr/bin/proxymngr
-# [fixed in git post-1.0.2]
-# unreferenced object=libnsl.so.1; unused dependency of /usr/bin/proxymngr
-MODULE_LDFLAGS = -z ignore
-
-MODULE_CONFIG_OPTS += --sysconfdir=/etc
+MODULE_LDFLAGS = $(ZDISCARD_UNUSED_DEP)
include ../Makefile.inc
--- a/open-src/app/synergy/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/app/synergy/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -104,8 +104,9 @@
MODULE_LDFLAGS = -L$(PROTODIR)/usr/lib$(ARCHLIBSUBDIR) \
-L$(PROTODIR)$(X11_DIR)/lib$(ARCHLIBSUBDIR) \
-R$(X11_DIR)/lib$(ARCHLIBSUBDIR) \
- -KPIC -Bdynamic -z ignore \
- -lstdcxx4 -lCrun -lCstd -lsocket -lnsl
+ -KPIC -Bdynamic $(ZDISCARD_UNUSED_DEP) \
+ -lstdcxx4 -lCrun -lsocket -lnsl
+MODULE_LD_OPTIONS = $(ZDISCARD_UNUSED_DEP)
INSTALL = /usr/bin/ginstall -c
MODULE_MAKE=$(GNUMAKE)
MODULE_MAKE_SET=yes
--- a/open-src/app/xcolor/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/app/xcolor/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -62,7 +62,7 @@
MODULE_INSTALL_MAKEFLAGS = bindir=$(X11_BIN_DIR) mandir=$(X11_MAN_DIR)
# Allow linker to skip linking to libm if compiler inlined all math functions
-MODULE_LDFLAGS = -z ignore
+MODULE_LDFLAGS = $(ZDISCARD_UNUSED_DEP)
# Man pages to apply Sun footer to & attributes to list
SUNTOUCHED_MANPAGES=xcolor.1
--- a/open-src/app/xdm/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/app/xdm/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -45,6 +45,7 @@
mkdir.patch,-p1 \
pam_tty.patch,-p1 \
pam_user.patch,-p1 \
+ greeter-linking.patch,-p1 \
bindir.patch,-p1 \
terminateServer.patch \
bug-6822636.patch \
@@ -81,7 +82,9 @@
# configure scripts add libraries like -lXt & -lXinerama to the global $(LIBS)
# when only some objects need them, so ignore them in the rest.
-MODTYPE_LD_OPTIONS = -z ignore
+MODULE_LD_OPTIONS = $(ZDISCARD_UNUSED_DEP)
+# but it misses adding -lc to the greeter shared object, so add it
+MODULE_LD_OPTIONS += -lc
# Additional build & install targets
MODULE_ADD_BUILD_TARGETS=build_xdm_configs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/app/xdm/greeter-linking.patch Sat Mar 14 12:06:11 2015 -0700
@@ -0,0 +1,47 @@
+From 284532c0884893728b75ca37f5d2a9a33f7bc8db Mon Sep 17 00:00:00 2001
+From: Julien Cristau <[email protected]>
+Date: Sat, 22 Oct 2011 17:14:46 +0200
+Subject: [PATCH:xdm] greeter: link against -lXrender if xft is enabled
+
+XmuCvtStringToXftColor uses XRenderParseColor, so require xrender for
+the xft option, and link against it.
+
+Signed-off-by: Julien Cristau <[email protected]>
+Reviewed-by: Alan Coopersmith <[email protected]>
+---
+ configure.ac | 4 ++--
+ greeter/Login.c | 4 ++++
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index b123a1f..2d95000 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -311,10 +311,10 @@ AC_ARG_WITH(xft,
+ AC_HELP_STRING([--with-xft],
+ [Use Xft to draw text (default is YES if installed)]),
+ [USE_XFT="$withval"],
+- PKG_CHECK_EXISTS(xft, [USE_XFT="yes"], [USE_XFT="no"]))
++ PKG_CHECK_EXISTS(xft xrender, [USE_XFT="yes"], [USE_XFT="no"]))
+
+ if test "x$USE_XFT" = "xyes" ; then
+- PKG_CHECK_MODULES(XFT, xft)
++ PKG_CHECK_MODULES(XFT, xft xrender)
+ GREETER_CFLAGS="$GREETER_CFLAGS $XFT_CFLAGS"
+ GREETER_LIBS="$GREETER_LIBS $XFT_LIBS"
+ AC_DEFINE([USE_XFT], 1,
+diff --git a/greeter/Login.c b/greeter/Login.c
+index 4903ea2..2fec5f4 100644
+--- a/greeter/Login.c
++++ b/greeter/Login.c
+@@ -91,6 +91,10 @@ from The Open Group.
+ # include <X11/extensions/Xinerama.h>
+ #endif
+
++#ifdef USE_XFT
++# include <X11/extensions/Xrender.h>
++#endif
++
+ #ifndef DEBUG
+ # define XDM_ASSERT(a) /* do nothing */
+ #else
--- a/open-src/app/xdriinfo/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/app/xdriinfo/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -56,6 +56,10 @@
# Needed for libGL to find libdrm at build time
MODULE_LDFLAGS=-L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR)
+# Needed to force use of Mesa libGL at runtime, since xdriinfo just prints
+# "libGL is too old" if nvidia libGL is found.
+MODULE_LDFLAGS += -R$(X11_LIB_DIR)/mesa$(ARCHLIBSUBDIR)
+
# Compatibility links from /usr/X11/bin to /usr/bin
MODULE_X11_BINCOMPAT_LINKS = xdriinfo
--- a/open-src/app/xfindproxy/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/app/xfindproxy/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -57,4 +57,7 @@
# Compatibility links from /usr/X11/bin to /usr/bin
MODULE_X11_BINCOMPAT_LINKS = xfindproxy
+# discard unneeded libX11 dependency that pkgconfig -libs xt generates
+MODULE_LDFLAGS = $(ZDISCARD_UNUSED_DEP)
+
include ../Makefile.inc
--- a/open-src/app/xfs/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/app/xfs/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -70,10 +70,7 @@
# Need to link with libfontenc in server private directory
MODULE_LDFLAGS=$(X11_SERVERLIBS_LDFLAGS)
-# ignore some unneeded dependencies that upstream includes:
-# unreferenced object=/usr/lib/64/libFS.so.5; unused dependency of /usr/bin/xfs
-MODULE_LDFLAGS += -z ignore
-
+# Install Solaris SMF files & service admin script
MODULE_ADD_INSTALL_TARGETS = install_smf install_fsadmin
# Compatibility links from /usr/X11/bin to /usr/bin
--- a/open-src/app/xinput/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/app/xinput/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -56,6 +56,6 @@
# ignore some unneeded dependencies that upstream includes:
# unreferenced object=libXext.so.0; unused dependency of /usr/bin/xinput
-MODULE_LDFLAGS = -z ignore
+MODULE_LDFLAGS = $(ZDISCARD_UNUSED_DEP)
include ../Makefile.inc
--- a/open-src/app/xmag/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/app/xmag/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -40,7 +40,7 @@
SOURCE_PATCHES =
# Allow linker to skip linking to libm if compiler inlined all math functions
-MODULE_LDFLAGS = -z ignore
+MODULE_LDFLAGS = $(ZDISCARD_UNUSED_DEP)
# Man pages to apply Sun footer to & attributes to list
SUNTOUCHED_MANPAGES=man/*.man
--- a/open-src/app/xpm/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-###############################################################################
-#
-# Xpm apps Makefile
-#
-# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
-#
-#
-
-# Package name used in tarballs
-# Source is really in X.Org's libXpm module
-MODULE_NAME=libXpm
-SOURCE_TARBALL_DIR=lib
-SOURCE_TARBALL_DIR_SET=yes
-
-# pkg(5) name we deliver the files in (override default)
-MODULE_PKGNAME=x11/library/libxpm
-MODULE_PKGNAME_SET=yes
-
-# Version number (used in path names)
-MODULE_VERSION=3.5.9
-
-# Checksums for upstream tarball
-TARBALL_MD5 = 2de3a1b9541f4b3a6f9d84b69d25530e
-TARBALL_SHA1 = 38258a1d589d3f157e0338d0fd13eec11bc4a39b
-
-# Patches to apply to source after unpacking, in order
-SOURCE_PATCHES =
-
-# man pages to apply Sun footer to & attributes to list
-SUNTOUCHED_MANPAGES=cxpm/cxpm.man sxpm/sxpm.man
-MODULE_STABILITY=Uncommitted
-
-INSTALL_TARGETS=install_xpm_apps
-INSTALL_TARGETS_SET=yes
-
-# Additional arguments to pass to make
-#MODULE_MAKEFLAGS= -e SUBDIRS="cxpm sxpm"
-
-# Compatibility links from /usr/X11/bin to /usr/bin
-MODULE_X11_BINCOMPAT_LINKS = cxpm sxpm
-
-include ../Makefile.inc
-
-install_xpm_apps: $(BUILD_TARGETS)
- $(DEFAULT_INSTALL_COMMAND:@DIR@=$(BUILD_DIR)/cxpm) install
- $(DEFAULT_INSTALL_COMMAND:@DIR@=$(BUILD_DIR)/sxpm) install
- mkdir -p $(PROTODIR)$(X11_LC_MESSAGES_DIR)
- cp -pf $(BUILD_DIR)/cxpm/cxpm.po $(PROTODIR)$(X11_LC_MESSAGES_DIR)
- cp -pf $(BUILD_DIR)/sxpm/sxpm.po $(PROTODIR)$(X11_LC_MESSAGES_DIR)
--- a/open-src/app/xpm/gettext.patch Mon Nov 11 14:46:00 2013 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,352 +0,0 @@
-commit bcda4f17ab3fa9f0572f876dbeb09b45fbc23f3d
-Author: Alan Coopersmith <[email protected]>
-Date: Tue Nov 21 17:12:18 2006 -0800
-
- Sun bug 4486226: Xpm is not internationalized
-
- <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=4486226>
- Use gettext() to allow translated messages in sxpm & cxpm
-
-diff --git a/acinclude.m4 b/acinclude.m4
-new file mode 100644
-index 0000000..4c60e33
---- /dev/null
-+++ b/acinclude.m4
-@@ -0,0 +1,15 @@
-+# AC_DEFINE_DIR macro from autoconf-archive.cryp.to
-+AC_DEFUN([AC_DEFINE_DIR], [
-+ prefix_NONE=
-+ exec_prefix_NONE=
-+ test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
-+ test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
-+dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn
-+dnl refers to ${prefix}. Thus we have to use `eval' twice.
-+ eval ac_define_dir="\"[$]$2\""
-+ eval ac_define_dir="\"$ac_define_dir\""
-+ AC_SUBST($1, "$ac_define_dir")
-+ AC_DEFINE_UNQUOTED($1, "$ac_define_dir", [$3])
-+ test "$prefix_NONE" && prefix=NONE
-+ test "$exec_prefix_NONE" && exec_prefix=NONE
-+])
-diff --git a/configure.ac b/configure.ac
-index 5dad93d..ff7e245 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -33,6 +33,26 @@ if test "x$GCC" = "xyes"; then
- CFLAGS="$GCC_WARNINGS $CFLAGS"
- fi
-
-+# Internationalization & localization support
-+AC_SEARCH_LIBS([gettext], [intl], [USE_GETTEXT="yes"], [USE_GETTEXT="no"])
-+AC_MSG_CHECKING([where to install localized messages])
-+AC_ARG_WITH([localedir], AC_HELP_STRING([--with-localedir=<path>],
-+ [Path to install message files in (default: datadir/locale)]),
-+ [LOCALEDIR=${withval}], [LOCALEDIR=${datadir}/locale])
-+AC_DEFINE_DIR([LOCALEDIR], [LOCALEDIR], [Location of translated messages])
-+if test "x$LOCALEDIR" = "xno" -o "x$USE_GETTEXT" = "xno" ; then
-+ AC_MSG_RESULT([nowhere])
-+ USE_GETTEXT="no"
-+else
-+ AC_MSG_RESULT([$LOCALEDIR])
-+fi
-+
-+if test "x$USE_GETTEXT" = "xyes" ; then
-+ AC_DEFINE([USE_GETTEXT], 1,
-+ [Define to 1 if you want to use the gettext() function.])
-+fi
-+AM_CONDITIONAL(USE_GETTEXT, test "x$USE_GETTEXT" = "xyes")
-+
- # Optional feature: When ___.xpm is requested, also look for ___.xpm.Z & .gz
- # Replaces ZFILEDEF = -DSTAT_ZFILE in old Imakefile
- AC_ARG_ENABLE(stat-zfile,
-diff --git a/cxpm/Makefile.am b/cxpm/Makefile.am
-index 4a1faa9..eea6dae 100644
---- a/cxpm/Makefile.am
-+++ b/cxpm/Makefile.am
-@@ -37,3 +37,11 @@ SUFFIXES = .$(APP_MAN_SUFFIX) .man
- .man.$(APP_MAN_SUFFIX):
- sed $(MAN_SUBSTS) < $< > $@
-
-+if USE_GETTEXT
-+noinst_DATA = cxpm.po
-+
-+cxpm.po: $(cxpm_SOURCES)
-+ xgettext -c"L10N_Comments" -d cxpm -n $(cxpm_SOURCES)
-+
-+CLEANFILES += cxpm.po
-+endif
-diff --git a/cxpm/cxpm.c b/cxpm/cxpm.c
-index 6a7cd9d..3b5e603 100644
---- a/cxpm/cxpm.c
-+++ b/cxpm/cxpm.c
-@@ -34,7 +34,16 @@
-
- #define CXPMPROG
-
-+#ifdef HAVE_CONFIG_H
-+#include <config.h>
-+#endif
- #include "XpmI.h"
-+#ifdef USE_GETTEXT
-+#include <locale.h>
-+#include <libintl.h>
-+#else
-+#define gettext(a) (a)
-+#endif
-
- #undef xpmGetC
- #define xpmGetC(data) sGetc(data, data->stream.file)
-@@ -86,9 +95,9 @@ #include "Attrib.c"
- #include "Image.c"
-
- void
--ErrorMessage(ErrorStatus, data)
-- int ErrorStatus;
-- xpmData *data;
-+ErrorMessage(
-+ int ErrorStatus,
-+ xpmData *data)
-
- {
- char *error = NULL;
-@@ -97,23 +106,36 @@ ErrorMessage(ErrorStatus, data)
- case XpmSuccess:
- return;
- case XpmOpenFailed:
-- error = "Cannot open file";
-+ /* L10N_Comments : Error produced when filename does not exist
-+ or insufficient permissions to open (i.e. cxpm /no/such/file ) */
-+ error = gettext("Cannot open file");
- break;
- case XpmFileInvalid:
-- error = "Invalid XPM file";
-+ /* L10N_Comments : Error produced when filename can be read, but
-+ is not an XPM file (i.e. cxpm /dev/null ) */
-+ error = gettext("Invalid XPM file");
- break;
- case XpmNoMemory:
-- error = "Not enough memory";
-+ /* L10N_Comments : Error produced when filename can be read, but
-+ is too big for memory
-+ (i.e. limit datasize 32 ; cxpm /usr/dt/backdrops/Crochet.pm ) */
-+ error = gettext("Not enough memory");
- break;
- case XpmColorFailed:
-- error = "Failed to parse color";
-+ /* L10N_Comments : Error produced when filename can be read, but
-+ contains an invalid color specification (need to create test case)*/
-+ error = gettext("Failed to parse color");
- break;
- }
-
- if (error) {
-- fprintf(stderr, "Xpm Error: %s.\n", error);
-+ /* L10N_Comments : Wrapper around above Xpm errors - %s is
-+ replaced with the contents of the error message retrieved above */
-+ fprintf(stderr, gettext("Xpm Error: %s.\n"), error);
- if (ErrorStatus == XpmFileInvalid && data)
-- fprintf(stderr, "Error found line %d near character %d\n",
-+ /* L10N_Comments : Error produced when filename can be read, but
-+ is not an XPM file (i.e. cxpm /dev/null ) */
-+ fprintf(stderr, gettext("Error found line %d near character %d\n"),
- data->lineNum + 1,
- data->charNum + 1);
- exit(1);
-@@ -130,9 +152,17 @@ main(argc, argv)
- int ErrorStatus;
- xpmData data;
-
-+#ifdef USE_GETTEXT
-+ setlocale(LC_ALL,"");
-+ bindtextdomain("cxpm",LOCALEDIR);
-+ textdomain("cxpm");
-+#endif
-+
- if (argc > 1) {
- if (!strcmp(argv[1], "-?") || !strncmp(argv[1], "-h", 2)) {
-- fprintf(stderr, "Usage: %s [filename]\n", argv[0]);
-+ /* L10N_Comments : Usage message produced by running cxpm -h
-+ %s will be replaced by argv[0] (program name) */
-+ fprintf(stderr, gettext("Usage: %s [filename]\n"), argv[0]);
- exit(1);
- }
- filename = argv[1];
-diff --git a/sxpm/Makefile.am b/sxpm/Makefile.am
-index 1b63cb3..04571de 100644
---- a/sxpm/Makefile.am
-+++ b/sxpm/Makefile.am
-@@ -42,6 +42,14 @@ SUFFIXES = .$(APP_MAN_SUFFIX) .man
- .man.$(APP_MAN_SUFFIX):
- sed $(MAN_SUBSTS) < $< > $@
-
-+if USE_GETTEXT
-+noinst_DATA = sxpm.po
-+
-+sxpm.po: $(sxpm_SOURCES)
-+ xgettext -c"L10N_Comments" -d sxpm -n $(sxpm_SOURCES)
-+
-+CLEANFILES += sxpm.po
-+endif
- endif
-
- EXTRA_DIST = \
-diff --git a/sxpm/sxpm.c b/sxpm/sxpm.c
-index 9d0b42e..a43d441 100644
---- a/sxpm/sxpm.c
-+++ b/sxpm/sxpm.c
-@@ -32,6 +32,10 @@
- * Developed by Arnaud Le Hors *
- \*****************************************************************************/
-
-+#ifdef HAVE_CONFIG_H
-+#include <config.h>
-+#endif
-+
- #include <stdio.h>
- #include <stdlib.h>
- #include <X11/StringDefs.h>
-@@ -47,6 +51,13 @@ #endif
-
- #include <X11/xpm.h>
-
-+#ifdef USE_GETTEXT
-+#include <locale.h>
-+#include <libintl.h>
-+#else
-+#define gettext(a) (a)
-+#endif
-+
- /* XPM */
- /* plaid pixmap */
- static char *plaid[] = {
-@@ -158,11 +169,19 @@ #ifdef Debug
- char *buffer;
- #endif
-
-+#ifdef USE_GETTEXT
-+ XtSetLanguageProc(NULL,NULL,NULL);
-+ bindtextdomain("sxpm",LOCALEDIR);
-+ textdomain("sxpm");
-+#endif
-+
- topw = XtInitialize(argv[0], "Sxpm",
- options, XtNumber(options), &argc, argv);
-
- if (!topw) {
-- fprintf(stderr, "Sxpm Error... [ Undefined DISPLAY ]\n");
-+ /* L10N_Comments : Error if no $DISPLAY or $DISPLAY can't be opened.
-+ Not normally reached as Xt exits before we get here. */
-+ fprintf(stderr, gettext("Sxpm Error... [ Undefined DISPLAY ]\n"));
- exit(1);
- }
- colormap = XDefaultColormapOfScreen(XtScreen(topw));
-@@ -467,7 +486,9 @@ #endif
- unsigned int i, j;
-
- for (i = 0; i < view.attributes.nextensions; i++) {
-- fprintf(stderr, "Xpm extension : %s\n",
-+ /* L10N_Comments : Output when -v & file has extensions
-+ %s is replaced by extension name */
-+ fprintf(stderr, gettext("Xpm extension : %s\n"),
- view.attributes.extensions[i].name);
- for (j = 0; j < view.attributes.extensions[i].nlines; j++)
- fprintf(stderr, "\t\t%s\n",
-@@ -559,8 +580,10 @@ #endif
- void
- Usage()
- {
-- fprintf(stderr, "\nUsage: %s [options...]\n", command[0]);
-- fprintf(stderr, "Where options are:\n\
-+ /* L10N_Comments : Usage message (sxpm -h) in two parts.
-+ In the first part %s is replaced by the command name. */
-+ fprintf(stderr, gettext("\nUsage: %s [options...]\n"), command[0]);
-+ fprintf(stderr, gettext("Where options are:\n\
- \n\
- [-d host:display] Display to connect to.\n\
- [-g geom] Geometry of window.\n\
-@@ -587,7 +610,7 @@ Usage()
- [-version] Print out program's version number\n\
- and library's version number if different.\n\
- if no input is specified sxpm reads from standard input.\n\
--\n");
-+\n"));
- exit(0);
- }
-
-@@ -604,27 +627,48 @@ ErrorMessage(ErrorStatus, tag)
- case XpmSuccess:
- return;
- case XpmColorError:
-- warning = "Could not parse or alloc requested color";
-+/* L10N_Comments : The following set of messages are classified as
-+ either errors or warnings. Based on the class of message, different
-+ wrappers are selected at the end to state the message source & class.
-+
-+ L10N_Comments : WARNING produced when filename can be read, but
-+ contains an invalid color specification (need to create test case)*/
-+ warning = gettext("Could not parse or alloc requested color");
- break;
- case XpmOpenFailed:
-- error = "Cannot open file";
-+ /* L10N_Comments : ERROR produced when filename does not exist
-+ or insufficient permissions to open (i.e. sxpm /no/such/file ) */
-+ error = gettext("Cannot open file");
- break;
- case XpmFileInvalid:
-- error = "Invalid XPM file";
-+ /* L10N_Comments : ERROR produced when filename can be read, but
-+ is not an XPM file (i.e. sxpm /dev/null ) */
-+ error = gettext("Invalid XPM file");
- break;
- case XpmNoMemory:
-- error = "Not enough memory";
-+ /* L10N_Comments : ERROR produced when filename can be read, but
-+ is too big for memory
-+ (i.e. limit datasize 32 ; sxpm /usr/dt/backdrops/Crochet.pm ) */
-+ error = gettext("Not enough memory");
- break;
- case XpmColorFailed:
-- error = "Failed to parse or alloc some color";
-+ /* L10N_Comments : ERROR produced when filename can be read, but
-+ contains an invalid color specification (need to create test case)*/
-+ error = gettext("Failed to parse or alloc some color");
- break;
- }
-
- if (warning)
-- fprintf(stderr, "%s Xpm Warning: %s.\n", tag, warning);
-+ /* L10N_Comments : Wrapper around above WARNING messages.
-+ First %s is the tag for the operation that produced the warning.
-+ Second %s is the message selected from the above set. */
-+ fprintf(stderr, gettext("%s Xpm Warning: %s.\n"), tag, warning);
-
- if (error) {
-- fprintf(stderr, "%s Xpm Error: %s.\n", tag, error);
-+ /* L10N_Comments : Wrapper around above ERROR messages.
-+ First %s is the tag for the operation that produced the error.
-+ Second %s is the message selected from the above set */
-+ fprintf(stderr, gettext("%s Xpm Error: %s.\n"), tag, error);
- Punt(1);
- }
- }
-@@ -695,15 +739,16 @@ VersionInfo()
- char libminor;
-
- GetNumbers(XpmIncludeVersion, &format, &libmajor, &libminor);
-- fprintf(stderr, "sxpm version: %d.%d%c\n",
-+ /* L10N_Comments : sxpm -version output */
-+ fprintf(stderr, gettext("sxpm version: %d.%d%c\n"),
- format, libmajor, libminor);
-- /*
-+ /* L10N_Comments :
- * if we are linked to an XPM library different from the one we've been
-- * compiled with, print its own number too.
-+ * compiled with, print its own number too when sxpm -version is called.
- */
- if (XpmIncludeVersion != XpmLibraryVersion()) {
- GetNumbers(XpmLibraryVersion(), &format, &libmajor, &libminor);
-- fprintf(stderr, "using the XPM library version: %d.%d%c\n",
-+ fprintf(stderr, gettext("using the XPM library version: %d.%d%c\n"),
- format, libmajor, libminor);
- }
- }
--- a/open-src/app/xpr/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/app/xpr/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -47,7 +47,7 @@
SOURCE_PATCHES += 6724753.patch,-p1
# Allow linker to skip linking to libm if compiler inlined all math functions
-MODULE_LDFLAGS = -z ignore
+MODULE_LDFLAGS = $(ZDISCARD_UNUSED_DEP)
# Man pages to apply Sun footer to & attributes to list
SUNTOUCHED_MANPAGES=*.man
--- a/open-src/app/xrandr/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/app/xrandr/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -62,7 +62,7 @@
# ignore some unneeded dependencies that upstream includes:
# unreferenced object=libXrender.so.1; unused dependency of /usr/bin/xrandr
-MODULE_LDFLAGS = -z ignore
+MODULE_LDFLAGS = $(ZDISCARD_UNUSED_DEP)
include ../Makefile.inc
--- a/open-src/app/xstdcmap/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/app/xstdcmap/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -54,6 +54,6 @@
# ignore some unneeded dependencies that upstream includes:
# unreferenced object=libXt.so.4; unused dependency of /usr/bin/xstdcmap
-MODULE_LDFLAGS = -z ignore
+MODULE_LDFLAGS = $(ZDISCARD_UNUSED_DEP)
include ../Makefile.inc
--- a/open-src/common/Makefile.inc Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/common/Makefile.inc Sat Mar 14 12:06:11 2015 -0700
@@ -514,7 +514,7 @@
# Command line options to GNU autoconf configure script
DEFAULT_CONFIG_OPTS = --prefix=$(MODULE_PREFIX) \
--without-xmlto --without-asciidoc --without-fop \
- --mandir='$${prefix}/share/man' --localstatedir=/var
+ --mandir='$${prefix}/share/man' --localstatedir=/var --sysconfdir=/etc
CONFIG_OPTS = $(DEFAULT_CONFIG_OPTS) \
$(MODTYPE_CONFIG_OPTS) $(MODULE_CONFIG_OPTS)
@@ -575,23 +575,26 @@
### Default rules for common build pattern
-LD_OPTIONS = -L$(PROTODIR)$(X11_DIR)/lib$(LIBSUBDIR) \
- $(MODTYPE_LD_OPTIONS) $(MODULE_LD_OPTIONS)
+LD_OPTIONS = $(DEFAULT_LD_OPTIONS) $(MODTYPE_LD_OPTIONS) $(MODULE_LD_OPTIONS)
+
+LD_EXEC_OPTIONS = $(DEFAULT_LD_EXEC_OPTIONS)
+LD_EXEC_OPTIONS += $(MODTYPE_LD_EXEC_OPTIONS) $(MODULE_LD_EXEC_OPTIONS)
+LD_SHARED_OPTIONS = $(DEFAULT_LD_SHARED_OPTIONS)
+LD_SHARED_OPTIONS += $(MODTYPE_LD_SHARED_OPTIONS) $(MODULE_LD_SHARED_OPTIONS)
+
+BUILD_ENV = LD_OPTIONS='$(LD_OPTIONS)'
+BUILD_ENV += LD_EXEC_OPTIONS='$(LD_EXEC_OPTIONS)'
+BUILD_ENV += LD_SHARED_OPTIONS='$(LD_SHARED_OPTIONS)'
+BUILD_ENV += PROTODIR='$(PROTODIR)'
+BUILD_ENV += MAKE='$(MODULE_MAKE)'
# MKDIRPROG - Workaround parallel build race condition
# in older upstream packaged install-sh
-
-BUILD_ENV = LD_OPTIONS='$(LD_OPTIONS)'
-BUILD_ENV += PROTODIR='$(PROTODIR)'
-BUILD_ENV += MAKE='$(MODULE_MAKE)'
BUILD_ENV += MKDIRPROG='mkdir -p'
BUILD_ENV += PYTHONPATH="$(PYTHON_PATH)"
$(WITH_PARFAIT) BUILD_ENV += $(PARFAIT_ENV)
BUILD_ENV += $(MODTYPE_BUILD_ENV) $(MODULE_BUILD_ENV)
-# ASLR tagging
-BUILD_ENV += LD_EXEC_OPTIONS='-z aslr=enable'
-
DEFAULT_BUILD_MAKEFLAGS=$(MODTYPE_MAKEFLAGS) $(MODULE_MAKEFLAGS) \
$(MODTYPE_BUILD_MAKEFLAGS) $(MODULE_BUILD_MAKEFLAGS)
--- a/open-src/common/Makefile.init Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/common/Makefile.init Sat Mar 14 12:06:11 2015 -0700
@@ -190,11 +190,13 @@
ARCH64_FLAGS += $(ARCH_FLAGS_$(MACH)_$(MODULE_COMPILER))
ARCH_LIB_FLAGS = $(ARCH_LIB_FLAGS_$(MACH)_$(MODULE_COMPILER))
+CPPFLAGS = -D_REENTRANT
+
# Flags for specific binary types
-LIB_CPPFLAGS = -D_REENTRANT
+LIB_CPPFLAGS = $(CPPFLAGS)
LIB_CFLAGS = $(CFLAGS) $(ARCH_LIB_FLAGS)
LIB_CXXFLAGS = $(CXXFLAGS) $(ARCH_LIB_FLAGS)
-PROG_CPPFLAGS = -DFD_SETSIZE=$(FD_SETSIZE)
+PROG_CPPFLAGS = $(CPPFLAGS) -DFD_SETSIZE=$(FD_SETSIZE)
PROG_CFLAGS = $(CFLAGS)
PROG_CXXFLAGS = $(CXXFLAGS)
@@ -223,43 +225,34 @@
XORG_EXTERNS_FILE = mapfile-Xorg-externs.$(MACH)
+# Flags to discard at link time unnecessary dependencies, .o files or
+# ELF sections that upstream may have included that we don't use.
+ZDISCARD_UNUSED_DEP = -zdiscard-unused=dependencies
+ZDISCARD_UNUSED_FIL = -zdiscard-unused=files
+ZDISCARD_UNUSED_SEC = -zdiscard-unused=sections
+
+# Include -lc as workaround for bug 17815318 so libm can actually go away
+# if -xlibmil manages to inline all math functions.
+ZDISCARD_UNUSED_DEP += -lc
+
# Common flags for all binaries
-LDFLAGS_common = -z lazyload -B direct -z guidance
-LDFLAGS_common += $(MAPFILES_FOR_ALL)
+DEFAULT_LD_OPTIONS = -z lazyload -B direct -z guidance
+DEFAULT_LD_OPTIONS += $(MAPFILES_FOR_ALL)
+DEFAULT_LD_OPTIONS += -L$(PROTODIR)$(X11_DIR)/lib$(LIBSUBDIR)
# Strip debug info out of non-debug builds
-$(BUILD_DEBUG:yes=$(POUND_SIGN)) LDFLAGS_common += -z strip-class=debug
-
-# LIB_REQUIRED_LDFLAGS are forced on via LD_OPTIONS to override libtool when
-# building libraries.
-LIB_REQUIRED_LDFLAGS = -z text -z defs
-LIB_LDFLAGS_common = $(LDFLAGS_common) $(LIB_REQUIRED_LDFLAGS)
+$(BUILD_DEBUG:yes=$(POUND_SIGN)) DEFAULT_LD_OPTIONS += -z strip-class=debug
-# Flags for programs
-PROG_LDFLAGS_common = $(LDFLAGS_common) $(MAPFILES_FOR_PROGS)
-
-# Sun Studio recognizes the common linker flags without -Wl, and
-# Sun Studio CC can't handle -Wl,-flag,option format, so just pass directly
-LDFLAGS_suncc = $(LDFLAGS_common)
-LIB_LDFLAGS_suncc = $(LIB_LDFLAGS_common)
-PROG_LDFLAGS_suncc = $(PROG_LDFLAGS_common)
+# gcc often links with libgcc.a and/or libgcc_s.so whether it's needed or not
+DEFAULT_LD_OPTIONS_gcc = $(ZDISCARD_UNUSED_DEP) $(ZDISCARD_UNUSED_FIL)
-# gcc requires additional library path for libgcc_s.so
-DEFAULT_LDFLAGS_gcc = -L/usr/gcc/$(GCC_VERSION)/lib$(ARCHLIBSUBDIR) \
- -R/usr/gcc/$(GCC_VERSION)/lib$(ARCHLIBSUBDIR)
+DEFAULT_LD_OPTIONS += $(DEFAULT_LD_OPTIONS_$(MODULE_COMPILER))
-# Need to use -Wl,.. to pass linker flags through gcc
-GCC_CONVERT_LDFLAGS_CMD=sed -e 's/-M /-Wl,-M,/g' -e 's/-B /-Wl,-B,/g'
-GCC_LDFLAGS_CMD=echo $(LDFLAGS_common) | $(GCC_CONVERT_LDFLAGS_CMD)
-LDFLAGS_gcc=$(GCC_LDFLAGS_CMD:sh) $(DEFAULT_LDFLAGS_gcc)
-GCC_LIB_LDFLAGS_CMD=echo $(LIB_LDFLAGS_common) | $(GCC_CONVERT_LDFLAGS_CMD)
-LIB_LDFLAGS_gcc=$(GCC_LIB_LDFLAGS_CMD:sh)
-GCC_PROG_LDFLAGS_CMD=echo $(PROG_LDFLAGS_common) | $(GCC_CONVERT_LDFLAGS_CMD)
-PROG_LDFLAGS_gcc=$(GCC_PROG_LDFLAGS_CMD:sh)
+# Ensure required flags for .so's are applied, despite libtool interference
+DEFAULT_LD_SHARED_OPTIONS = -z text -z defs
-LDFLAGS=$(LDFLAGS_$(MODULE_COMPILER))
-LIB_LDFLAGS=$(LIB_LDFLAGS_$(MODULE_COMPILER))
-PROG_LDFLAGS=$(PROG_LDFLAGS_$(MODULE_COMPILER))
+# Ensure we do ASLR tagging & mark stacks/heaps non-executable on programs
+DEFAULT_LD_EXEC_OPTIONS = -z aslr=enable $(MAPFILES_FOR_PROGS)
## Commonly added options
--- a/open-src/common/delibtoolize.pl Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/common/delibtoolize.pl Sat Mar 14 12:06:11 2015 -0700
@@ -1,6 +1,6 @@
#! /usr/perl5/bin/perl
#
-# Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -241,8 +241,8 @@
[\\\s]+ --mode=link
}{}xs;
- # Change -rpath to -R in link arguments
- $l =~ s{(\s*)-rpath(\s*)}{$1-R$2}msg;
+ # Remove -rpath <directory> from link arguments
+ $l =~ s{(\s*)-rpath[\\\s]+\S+(\s*)}{$1}msg;
# Change flags for building shared object from arguments to libtool
# script into arguments to linker
@@ -251,6 +251,7 @@
$l =~ s{(_la_LDFLAGS\s*=\s*)}{$1 $sharedobjflags }ms;
$l =~ s{(\s+)-avoid-version\b}{$1}ms;
$l =~ s{(\s+)-module\b}{$1}ms;
+ $l =~ s{(\s+)-export-symbols(-regex)?\s*\S+}{$1}ms;
$l =~ s{(\s+)-version-(?:number|info)\s+\S+}{$1-h \$\@}ms;
$l =~ s{(\s+)-no-undefined\b}{$1-z defs}ms;
}
--- a/open-src/driver/Makefile.inc Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/driver/Makefile.inc Sat Mar 14 12:06:11 2015 -0700
@@ -78,12 +78,19 @@
MODTYPE_CFLAGS_gcc_common = # -fvisibility=hidden - doesn't work with gcc 3.4.3
MODTYPE_CFLAGS += $(MODTYPE_CFLAGS_$(MODULE_COMPILER)_common)
-MODTYPE_LDFLAGS=$(LDFLAGS) -R/lib$(ARCHLIBSUBDIR)
+# Many drivers fail to list -lc in their dependencies upstream, but not
+# all shared objects need it, so add it, but discard if not useful.
+MODTYPE_LD_SHARED_OPTIONS = $(ZDISCARD_UNUSED_DEP) -lc
+# Resolve calls to functions in Xorg against the Xorg binary
XORG_EXTERNS_FLAG = -z parent=$(PROTODIR)$(X11_BIN_DIR)/Xorg
-DEFAULT_MODTYPE_LD_OPTIONS = -z defs $(XORG_EXTERNS_FLAG) -z ignore -lc
-$(USE_DEFAULT_MODTYPE_LD_OPTIONS:no=$(POUND_SIGN)) MODTYPE_LD_OPTIONS = $(DEFAULT_MODTYPE_LD_OPTIONS)
+# added to shared flags by default, but can be overridden if building
+# non-driver shared objects in a driver module
+$(XORG_EXTERNS_IN_LD_SHARED_OPTIONS:no=$(POUND_SIGN)) \
+ MODTYPE_LD_SHARED_OPTIONS += $(XORG_EXTERNS_FLAG)
+# Debug builds may leave references to pixman functions from inline function
+# calls in headers that normally get optimized out in non-debug builds.
$(BUILD_DEBUG:yes=) MODTYPE_DEBUG_LD_OPTIONS = -lpixman-1
$(BUILD_DEBUG:yes=$(POUND_SIGN)) MODTYPE_DEBUG_LD_OPTIONS =
MODTYPE_LD_OPTIONS += $(MODTYPE_DEBUG_LD_OPTIONS)
--- a/open-src/driver/efb/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/driver/efb/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -78,15 +78,10 @@
# Libraries/modules to link with
MODULE_LD_OPTIONS= \
-L$(PROTODIR)$(X11_SERVERMODS_DIR) \
- -L$(PROTODIR)$(X11_SERVERMODS_DIR)/extensions \
- -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
-L$(PROTODIR)/usr/lib$(ARCHLIBSUBDIR) \
-R$(X11_SERVERMODS_DIR) \
- -R$(X11_SERVERMODS_DIR)/extensions \
- -R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
- -R$(PROTODIR)/usr/lib$(ARCHLIBSUBDIR) \
-lexa -lfb -lint10 -lvbe -lvgahw -lshadow \
- -lpciaccess -lpixman-1 -ldrm -lglx -lm \
+ -lpciaccess -lpixman-1 -lm \
-M $(XF86_VIDEO_ATI_SRC)/mapfile-bt829_drv-external \
-M $(XF86_VIDEO_ATI_SRC)/mapfile-fi1236_drv-external \
-M $(XF86_VIDEO_ATI_SRC)/mapfile-msp3430_drv-external \
--- a/open-src/driver/xf86-input-synaptics/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/driver/xf86-input-synaptics/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -37,7 +37,7 @@
TARBALL_SHA256= 14e7d54f81c2a2503f8acbe5e265dc336a0f2b30d007657d7afbeff979821c11
# Patches to apply to source after unpacking, in order
-SOURCE_PATCHES= libraries.patch,-p1
+SOURCE_PATCHES=
# Man pages to apply Sun footer to & attributes to list
SUNTOUCHED_MANPAGES=man/*.man
@@ -46,16 +46,8 @@
# Extra flags to pass to configure script
MODULE_CONFIG_OPTS= --bindir=$(X11_SERVERLIBS_DIR)
-# Extra flags to link driver, but not utility programs with
-DRIVER_LD_FLAGS = $(DEFAULT_MODTYPE_LD_OPTIONS) -lm
-MODULE_CONFIG_OPTS += XORG_LIBS="$(DRIVER_LD_FLAGS)"
-USE_DEFAULT_MODTYPE_LD_OPTIONS = no
-
-# Override linker flags for programs
-SYN_PROG_LDFLAGS=$(MAPFILES_FOR_PROGS)
-PROGRAM_VARS = synclient syndaemon
-PROGRAM_MAKEFLAGS = $(PROGRAM_VARS:%=%_LDADD="$(SYN_PROG_LDFLAGS)")
-MODULE_BUILD_MAKEFLAGS = AM_MAKEFLAGS='$(PROGRAM_MAKEFLAGS)'
+# Extra flags to link with
+MODULE_LD_OPTIONS = $(ZDISCARD_UNUSED_DEP) -lm
# Extra install rules
MODULE_ADD_INSTALL_TARGETS = install_fdi
@@ -63,9 +55,6 @@
# Fix path for installing headers in proto area
MODULE_INSTALL_MAKEFLAGS = sdkdir='$(XORG_SDK_INCLUDES_DIR)'
-# Regenerate configure after patching configure.ac
-AUTORECONF=yes
-
# Install xorg-synaptics.pc to /usr/share since it defines the architecture
# independent header files in /usr/include and not any library flags
MODULE_PKGCONFIG_DIR=$(PKGCONFIG_DIR_SHARE)
--- a/open-src/driver/xf86-input-synaptics/libraries.patch Mon Nov 11 14:46:00 2013 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-From 36e34cd7e3b1c4939a35fb9fd97fc1b4b964d310 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 25 May 2012 14:51:55 -0700
-Subject: [PATCH:xf86-input-synaptics] Link with modules needed to build with
- no-undefined linking
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/Makefile.am | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 5443094..c6ed55d 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -26,6 +26,7 @@
- # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
- synaptics_drv_la_LTLIBRARIES = synaptics_drv.la
- synaptics_drv_la_LDFLAGS = -module -avoid-version
-+synaptics_drv_la_LIBADD = $(XORG_LIBS)
- synaptics_drv_ladir = @inputdir@
-
- AM_CPPFLAGS = -I$(top_srcdir)/include
-@@ -47,7 +48,7 @@ endif
- if BUILD_EVENTCOMM
- synaptics_drv_la_SOURCES += \
- eventcomm.c eventcomm.h
--synaptics_drv_la_LIBADD = \
-+synaptics_drv_la_LIBADD += \
- $(MTDEV_LIBS)
- endif
-
---
-1.7.9.2
-
--- a/open-src/driver/xf86-input-vmmouse/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/driver/xf86-input-vmmouse/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -37,10 +37,7 @@
TARBALL_SHA256= 04cfb60366008d4db815c550d8fb8d0a4270c75fa7a20fa3bddc9ecbd355612c
# Patches to apply to source after unpacking, in order
-SOURCE_PATCHES = libraries.patch,-p1
-
-# Regenerate configure after patching src/Makefile.am in libraries.patch
-AUTORECONF=yes
+SOURCE_PATCHES =
# vmmouse_client code won't build with Sun compiler
MODULE_COMPILER=gcc
@@ -62,15 +59,4 @@
--with-hal-fdi-dir=/etc/hal/fdi/policy/10osvendor \
--bindir=$(X11_SERVERLIBS_DIR)
-# Extra flags to link driver, but not utility programs with
-DRIVER_LD_FLAGS = $(DEFAULT_MODTYPE_LD_OPTIONS)
-MODULE_CONFIG_OPTS += XORG_LIBS="$(DRIVER_LD_FLAGS)"
-USE_DEFAULT_MODTYPE_LD_OPTIONS = no
-
-# Override linker flags for programs
-VMM_PROG_LDFLAGS=$(PROG_LDFLAGS) ../shared/libvmmouse.a
-PROGRAM_VARS = vmmouse_detect
-PROGRAM_MAKEFLAGS = $(PROGRAM_VARS:%=%_LDADD="$(VMM_PROG_LDFLAGS)")
-MODULE_BUILD_MAKEFLAGS = AM_MAKEFLAGS='$(PROGRAM_MAKEFLAGS)'
-
include ../Makefile.inc
--- a/open-src/driver/xf86-input-vmmouse/libraries.patch Mon Nov 11 14:46:00 2013 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-From b9d5b05cdfce05929b3014deb6aab0f33ba1afd7 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Fri, 25 May 2012 15:17:40 -0700
-Subject: [PATCH:xf86-input-vmmouse] Link with modules needed to build with
- no-undefined linking
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- src/Makefile.am | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 7e6ea36..81accf7 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -21,6 +21,7 @@
- @DRIVER_NAME@_drv_la_LTLIBRARIES = @DRIVER_NAME@_drv.la
- @DRIVER_NAME@_drv_la_LDFLAGS = -module -avoid-version
- @DRIVER_NAME@_drv_la_LIBADD = $(top_builddir)/shared/lib@[email protected]
-+@DRIVER_NAME@_drv_la_LIBADD += $(XORG_LIBS)
- @DRIVER_NAME@_drv_ladir = @inputdir@
-
- AM_CPPFLAGS = -I$(top_srcdir)/shared $(XORG_CFLAGS)
---
-1.7.9.2
-
--- a/open-src/driver/xf86-video-ati/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/driver/xf86-video-ati/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -57,21 +57,22 @@
# Extra flags to pass to configure script
MODULE_CONFIG_OPTS=--disable-kms
-# Paths to find libraries/modules to link with - libraries themselves listed
-# in src/Makefile.am since ATI has multiple submodules with different needs
-MODULE_LD_OPTIONS= \
+# Paths to find libraries/modules to link with
+radeon_drv_la_LDFLAGS_add = \
-L$(PROTODIR)$(X11_SERVERMODS_DIR) \
-L$(PROTODIR)$(MESA_XSERVERMODS_DIR)/extensions \
- -L$(PROTODIR)$(X11_SERVERMODS_DIR)/extensions \
-L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
+ -R$(X11_SERVERMODS_DIR) \
+ -R$(MESA_XSERVERMODS_DIR)/extensions \
+ -R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR)
+MODULE_BUILD_ENV = radeon_drv_la_LDFLAGS_add='$(radeon_drv_la_LDFLAGS_add)'
+
+# Mapfiles for symbols from other modules
+MODULE_LD_OPTIONS= \
-M $(PWD)/mapfile-bt829_drv-external \
-M $(PWD)/mapfile-fi1236_drv-external \
-M $(PWD)/mapfile-msp3430_drv-external \
-M $(PWD)/mapfile-tda9885_drv-external \
- -M $(PWD)/mapfile-uda1380_drv-external \
- -R$(X11_SERVERMODS_DIR) \
- -R$(MESA_XSERVERMODS_DIR)/extensions \
- -R$(X11_SERVERMODS_DIR)/extensions \
- -R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR)
+ -M $(PWD)/mapfile-uda1380_drv-external
include ../Makefile.inc
--- a/open-src/driver/xf86-video-ati/mapfiles.patch Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/driver/xf86-video-ati/mapfiles.patch Sat Mar 14 12:06:11 2015 -0700
@@ -1,8 +1,8 @@
diff --git a/src/Makefile.am b/src/Makefile.am
-index dc77c02..db4fa12 100644
+index 26ceda7..3fe220b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
-@@ -174,3 +174,39 @@ EXTRA_DIST = \
+@@ -175,3 +175,40 @@ EXTRA_DIST = \
radeon_atombios.h \
radeon_dri2.h \
drmmode_display.h
@@ -20,6 +20,7 @@
+ mapfile-bt829_drv-external
+
+radeon_drv_la_LDFLAGS += $(radeon_MAPFILES:%=-Wl,-M,%) \
++ $(radeon_drv_la_LDFLAGS_add) \
+ -lexa -lfb -lint10 -lvbe -lvgahw -lshadow \
+ -lpixman-1 -ldrm -lglx -lm
+
--- a/open-src/driver/xf86-video-intel/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/driver/xf86-video-intel/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -63,10 +63,6 @@
INSTALL_TARGETS_64 = install_docs
INSTALL_TARGETS += $(INSTALL_TARGETS_$(BUILD_TYPE))
INSTALL_TARGETS_SET=yes
-LIBXVMC_LD_OPTIONS = -L$(PROTODIR)$(X11_LIB_DIR)$(ARCHLIBSUBDIR)
-LIBXVMC_LD_OPTIONS += $(LIB_REQUIRED_LDFLAGS) -z ignore -lc -lX11
-MODULE_BUILD_ENV_32 = LD_OPTIONS="$(LIBXVMC_LD_OPTIONS)"
-MODULE_BUILD_ENV = $(MODULE_BUILD_ENV_$(BUILD_TYPE))
# Intel driver doesn't work on some chipsets if built with Sun compiler
MODULE_COMPILER=gcc
@@ -82,14 +78,17 @@
MODULE_CONFIG_ENV = echo=/usr/gnu/bin/echo
MODULE_BUILD_ENV += echo=/usr/gnu/bin/echo
+# Instead of allowing the default MODTYPE_LD_SHARED_OPTIONS to link everything
+# against the Xorg server binary, libraries.patch adds the XORG_EXTERNS_FLAG
+# variable to the link of just intel_drv.so not to the client-side XvMC libs.
+XORG_EXTERNS_IN_LD_SHARED_OPTIONS=no
+MODULE_BUILD_ENV += XORG_EXTERNS_FLAG='$(XORG_EXTERNS_FLAG)'
+
# Library paths at build time
-MODULE_LD_OPTIONS= -z ignore \
+MODULE_LD_OPTIONS = \
-L$(PROTODIR)$(X11_SERVERMODS_DIR) \
- -L$(PROTODIR)$(MESA_XSERVERMODS_DIR)/extensions \
- -L$(PROTODIR)$(X11_SERVERMODS_DIR)/extensions \
-L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
- -L$(PROTODIR)$(X11_LIB_DIR)$(ARCHLIBSUBDIR) \
- -M $(PWD)/mapfile.externs
+ -L$(PROTODIR)$(X11_LIB_DIR)$(ARCHLIBSUBDIR)
# Can't build tests with parfait yet, due to parfait-ld error:
$(WITH_PARFAIT) SOURCE_PATCHES += no-test.patch,-p1
--- a/open-src/driver/xf86-video-intel/libraries.patch Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/driver/xf86-video-intel/libraries.patch Sat Mar 14 12:06:11 2015 -0700
@@ -26,9 +26,9 @@
intel_drv_la_LDFLAGS = -module -avoid-version
intel_drv_ladir = @moduledir@/drivers
intel_drv_la_LIBADD = legacy/liblegacy.la @PCIACCESS_LIBS@
-+intel_drv_la_LDFLAGS += -R $(moduledir) -R $(moduledir)/extensions
-+intel_drv_la_LIBADD += -lfb -lshadowfb -lXfont -lm \
-+ -lvbe -lvgahw -lexa -lglx $(XORG_LIBS)
++intel_drv_la_LDFLAGS += -R $(moduledir)
++intel_drv_la_LIBADD += $(XORG_EXTERNS_FLAG) -lfb -lshadowfb -lm \
++ -lvbe -lvgahw -lexa $(XORG_LIBS)
if SNA
SUBDIRS += sna
--- a/open-src/driver/xf86-video-intel/mapfile.externs Mon Nov 11 14:46:00 2013 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-{
- global:
- I830DRI2FrameEventHandler = FUNCTION extern;
- I830DRI2FlipEventHandler = FUNCTION extern;
- noXFree86DRIExtension = FUNCTION extern;
- XFree = FUNCTION extern;
- XQueryTree = FUNCTION extern;
- XInternAtom = FUNCTION extern;
- XGetGeometry = FUNCTION extern;
-};
--- a/open-src/driver/xf86-video-mach64/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/driver/xf86-video-mach64/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -50,10 +50,8 @@
# Paths to find libraries/modules to link with
MODULE_LD_OPTIONS= \
-L$(PROTODIR)$(X11_SERVERMODS_DIR) \
- -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
-R$(X11_SERVERMODS_DIR) \
- -R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
- -lexa -lint10 -lpciaccess -lfb -lpixman-1 -lshadowfb -lXfont -lvbe
+ -lexa -lint10 -lpciaccess -lfb -lpixman-1 -lshadowfb -lvbe
# Additional install rules beyond what upstream installs
MODULE_ADD_INSTALL_TARGETS=install_docs
--- a/open-src/driver/xf86-video-mga/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/driver/xf86-video-mga/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -43,6 +43,9 @@
sparc.patch,-p1 \
rom_map.patch,-p1
+# Regenerate Makefile after libraries.patch patches src/Makefile.am
+AUTORECONF=yes
+
# Man pages to apply Sun footer to & attributes to list
SUNTOUCHED_MANPAGES=man/*.man
MODULE_STABILITY=Volatile
@@ -54,14 +57,8 @@
# Extra flags to link mga_drv.so, but not util/stormdwg binary with
DRIVER_LD_FLAGS = \
-L$(PROTODIR)$(X11_SERVERMODS_DIR) \
- -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
- -R$(X11_SERVERMODS_DIR) \
- -R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
- $(DEFAULT_MODTYPE_LD_OPTIONS)
+ -R$(X11_SERVERMODS_DIR)
MODULE_CONFIG_OPTS += XORG_LIBS="$(DRIVER_LD_FLAGS)"
-USE_DEFAULT_MODTYPE_LD_OPTIONS = no
-
-AUTORECONF=yes
include ../Makefile.inc
--- a/open-src/driver/xf86-video-openchrome/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/driver/xf86-video-openchrome/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -1,6 +1,6 @@
###############################################################################
#
-# Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -43,6 +43,8 @@
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES = manpage-sections.patch,-p1
SOURCE_PATCHES += CVE-2013-1994.patch,-p1
+SOURCE_PATCHES += ldflags.patch,-p1
+SOURCE_PATCHES += disable-xvmc.patch,-p1
# Extra rules to run when unpacking upstream source
CLEAN_LINEFEED_TARGET = $(SOURCE_DIR)/.source.clean.done
@@ -58,19 +60,25 @@
# Extra flags to pass to configure script
# - Disable DRI since the kernel module isn't ported
MODULE_CONFIG_OPTS=--disable-dri --disable-kms
+# --libdir is needed to set path for XvMC libraries
+MODULE_CONFIG_OPTS += --libdir='$(X11_LIB_DIR)$(ARCHLIBSUBDIR)'
-# Libraries/modules to link with
-MODULE_LD_OPTIONS= \
+# Instead of allowing the default MODTYPE_LD_SHARED_OPTIONS to link all
+# the libraries against the Xorg server binary, ldflags.patch adds
+# $(openchrome_drv_la_LDFLAGS_add) to the link of just openchrome_drv.so,
+# but not to the client side XvMC libs.
+XORG_EXTERNS_IN_LD_SHARED_OPTIONS=no
+openchrome_drv_la_LDFLAGS_add = \
-L$(PROTODIR)$(X11_SERVERMODS_DIR) \
-L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
- -L$(PROTODIR)$(MESA_XSERVERMODS_DIR)/extensions \
- -L$(PROTODIR)$(X11_SERVERMODS_DIR)/extensions \
-L$(PROTODIR)$(X11_LIB_DIR)$(ARCHLIBSUBDIR) \
-R$(X11_SERVERMODS_DIR) \
-R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
+ $(XORG_EXTERNS_FLAG) -M $(PWD)/mapfile.externs \
-lfb -lint10 -lpciaccess -lpixman-1 -lvbe \
- -lexa -lvgahw -lshadowfb -lXfont -lm -ldrm -lshadow \
- -M $(PWD)/mapfile.externs
+ -lexa -lvgahw -lm -ldrm -lshadow
+MODULE_BUILD_ENV = \
+ openchrome_drv_la_LDFLAGS_add='$(openchrome_drv_la_LDFLAGS_add)'
include ../Makefile.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/driver/xf86-video-openchrome/disable-xvmc.patch Sat Mar 14 12:06:11 2015 -0700
@@ -0,0 +1,17 @@
+diff --git a/configure.ac b/configure.ac
+index 6fb5476..f2cad6c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -133,6 +133,12 @@ else
+ XVMC="no"
+ fi
+
++dnl No support for openchrome DRI on Solaris
++case $host_os in
++ *solaris*)
++ XVMC="no" ;;
++esac
++
+ if test "x$XVMC" = xyes; then
+ AC_CHECK_HEADERS(pthread.h sys/ioctl.h sys/time.h time.h,,[XVMC="no"; break],)
+ PKG_CHECK_MODULES(XVMC, [x11 xext xvmc])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/driver/xf86-video-openchrome/ldflags.patch Sat Mar 14 12:06:11 2015 -0700
@@ -0,0 +1,15 @@
+Allow our Makefile to pass through added flags to be applied just to
+the driver module and not the XvMC libraries.
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 9bac9e9..7f8b13e 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -32,6 +32,7 @@ CONFIG_CLEAN_FILES= version.h
+ AM_CFLAGS = @XORG_CFLAGS@ @LIBUDEV_CFLAGS@ @DRI_CFLAGS@
+ openchrome_drv_la_LTLIBRARIES = openchrome_drv.la
+ openchrome_drv_la_LDFLAGS = -module -avoid-version @LIBUDEV_LIBS@
++openchrome_drv_la_LDFLAGS += $(openchrome_drv_la_LDFLAGS_add)
+ openchrome_drv_ladir = @moduledir@/drivers
+
+ openchrome_drv_la_SOURCES = \
--- a/open-src/driver/xf86-video-openchrome/manpage-sections.patch Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/driver/xf86-video-openchrome/manpage-sections.patch Sat Mar 14 12:06:11 2015 -0700
@@ -1,15 +1,16 @@
Use XORG_MANPAGE_SECTIONS to get the right OS-specific man page sections
instead of the hardcoded Linux/BSD sections that don't match SysV/Solaris.
---- xf86-video-openchrome-0.2.904/configure.ac Wed Oct 7 16:41:12 2009
-+++ xf86-video-openchrome-0.2.904/configure.ac Thu Apr 8 15:11:06 2010
-@@ -169,8 +169,7 @@
+diff --git a/configure.ac b/configure.ac
+index 238e3af..6fb5476 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -170,8 +170,6 @@ AC_DEFINE(X_USE_REGION_NULL,1,[Compatibility define for older Xen])
AC_DEFINE(X_HAVE_XAAGETROP,1,[Compatibility define for older Xen])
AC_DEFINE(X_NEED_I2CSTART,1,[Compatibility define for older Xen])
-DRIVER_MAN_SUFFIX="4"
-AC_SUBST([DRIVER_MAN_SUFFIX])
-+XORG_MANPAGE_SECTIONS
+ XORG_MANPAGE_SECTIONS
XORG_RELEASE_VERSION
-
--- a/open-src/driver/xf86-video-r128/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/driver/xf86-video-r128/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -50,11 +50,7 @@
# Paths to find libraries/modules to link with
MODULE_LD_OPTIONS= \
-L$(PROTODIR)$(X11_SERVERMODS_DIR) \
- -L$(PROTODIR)$(X11_SERVERMODS_DIR)/extensions \
- -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
-R$(X11_SERVERMODS_DIR) \
- -R$(X11_SERVERMODS_DIR)/extensions \
- -R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
-lint10 -lpciaccess -lfb -lpixman-1 -lvbe -lfbdevhw -lvgahw
# Additional install rules beyond what upstream installs
--- a/open-src/driver/xf86-video-vesa/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/driver/xf86-video-vesa/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -49,9 +49,7 @@
# Libraries/modules to link with
MODULE_LD_OPTIONS= \
-L$(PROTODIR)$(X11_SERVERMODS_DIR) \
- -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
-R$(X11_SERVERMODS_DIR) \
- -R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
-lfb -lpciaccess -lshadow -lvbe
include ../Makefile.inc
--- a/open-src/driver/xf86-video-vmware/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/driver/xf86-video-vmware/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -53,9 +53,7 @@
# Libraries/modules to link with
MODULE_LD_OPTIONS= \
-L$(PROTODIR)$(X11_SERVERMODS_DIR) \
- -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
-R$(X11_SERVERMODS_DIR) \
- -R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
- -lfb -lpixman-1 -lshadowfb -lXfont -lvgahw -lpciaccess
+ -lfb -lpixman-1 -lshadowfb -lvgahw -lpciaccess
include ../Makefile.inc
--- a/open-src/font/Makefile.inc Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/font/Makefile.inc Sat Mar 14 12:06:11 2015 -0700
@@ -87,9 +87,11 @@
# sun-aliases module or during packaging in generate_font_metadata.pl).
MODTYPE_CONFIG_OPTS += MKFONTDIR=/usr/bin/true
-# Most font modules have nothing to build, for those that do, use lib flags
-MODTYPE_CFLAGS=$(LIB_CFLAGS)
-MODTYPE_LDFLAGS=$(LIB_LDFLAGS)
+# Most font modules have nothing to build, but font-util builds some programs
+MODTYPE_CFLAGS=$(PROG_CFLAGS)
+MODTYPE_CPPFLAGS=$(PROG_CPPFLAGS)
+MODTYPE_CXXFLAGS=$(PROG_CXXFLAGS)
+MODTYPE_LDFLAGS=$(PROG_LDFLAGS)
MODTYPE_LD_OPTIONS=
# Paths to find mkfontscale, fc-cache & the libraries they need in build area
--- a/open-src/lib/DPS/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/lib/DPS/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -64,7 +64,7 @@
PROG_LDFLAGS="$(PROG_LDFLAGS)"
# Allow linker to skip linking to libm if compiler inlined all math functions
-MODULE_LDFLAGS = -z ignore
+MODULE_LDFLAGS = $(ZDISCARD_UNUSED_DEP)
# Compatibility links from /usr/X11/bin to /usr/bin
MODULE_X11_BINCOMPAT_LINKS = makepsres pswrap
--- a/open-src/lib/Makefile.inc Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/lib/Makefile.inc Sat Mar 14 12:06:11 2015 -0700
@@ -59,7 +59,7 @@
MODTYPE_CFLAGS=$(LIB_CFLAGS)
MODTYPE_CXXFLAGS=$(LIB_CXXFLAGS)
MODTYPE_LDFLAGS=$(LIB_LDFLAGS) -lc
-MODTYPE_LD_OPTIONS=$(LIB_REQUIRED_LDFLAGS)
+MODTYPE_LD_OPTIONS=
# Additional command line options to GNU autoconf configure script
MODTYPE_CONFIG_OPTS = --enable-shared=yes --enable-static=no \
--- a/open-src/lib/freeglut/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/lib/freeglut/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -80,7 +80,7 @@
# unreferenced object=libXext.so.0; unused dependency of libglut.so.3.9.0
# unreferenced object=libXxf86vm.so.1; unused dependency of libglut.so.3.9.0
# unreferenced object=libXi.so.5; unused dependency of libglut.so.3.9.0
-MODULE_LD_OPTIONS = -z ignore
+MODULE_LD_OPTIONS = $(ZDISCARD_UNUSED_DEP)
# Additional targets to install
MODULE_ADD_INSTALL_TARGETS = install_doc
--- a/open-src/lib/libX11/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/lib/libX11/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -141,8 +141,9 @@
MODULE_LDFLAGS = -R$(X11_LIB_DIR)$(ARCHLIBSUBDIR)
-# Need to ignore extra libraries like -lsocket & -lnsl in i18n modules
-MODULE_LD_OPTIONS = -z ignore
+# Need to discard -lc in .so's that don't need it, but leave it for those
+# which do need to link to it.
+MODULE_LD_OPTIONS = $(ZDISCARD_UNUSED_DEP)
# Backwards compatibility for old paths until g11n moves all input methods
MODULE_CONFIG_ENV = \
--- a/open-src/lib/libX11/solaris-abi.patch Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/lib/libX11/solaris-abi.patch Sat Mar 14 12:06:11 2015 -0700
@@ -20,24 +20,11 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#
-diff --git a/configure.ac b/configure.ac
-index 8ad1f00..a8ed884 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -195,7 +195,7 @@ if test x$XLIB_LOADABLE_I18N = xyes; then
- fi
- AC_DEFINE(USE_DYNAMIC_LC,1,
- [Split some i18n functions into loadable modules])
-- AC_SUBST(I18N_MODULE_LIBS,'${top_builddir}/src/libX11.la')
-+ AC_SUBST(I18N_MODULE_LIBS,'${top_builddir}/src/libX11.so.4 -lc')
- fi
- AC_MSG_RESULT($XLIB_LOADABLE_I18N)
-
diff --git a/src/Makefile.am b/src/Makefile.am
index d46b493..ddad93c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
-@@ -364,9 +364,14 @@ if XKB
+@@ -364,7 +364,11 @@ if XKB
USE_XKB_LIBS = $(XKB_LIBS)
endif
@@ -49,7 +36,4 @@
+ -N libXext.so.0
libX11_la_LIBADD = \
-+ -lc \
$(USE_I18N_LIBS) \
- $(USE_XCMS_LIBS) \
- $(USE_XKB_LIBS) \
--- a/open-src/lib/libXaw5/sun-src/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/lib/libXaw5/sun-src/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -1,4 +1,4 @@
-# Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -26,7 +26,7 @@
Repeater.c Scrollbar.c Simple.c SimpleMenu.c Sme.c SmeBSB.c \
SmeLine.c StripChart.c TextSrc.c \
TextAction.c TextPop.c TextTr.c Toggle.c Tree.c Vendor.c \
- XawIm.c XawInit.c XawI18n.c sharedlib.c \
+ XawIm.c XawInit.c XawI18n.c \
Text.c TextSink.c Viewport.c AsciiSrc.c MultiSrc.c
OBJS = $(SRCS:.c=.o)
--- a/open-src/lib/libXaw5/sun-src/sharedlib.c Mon Nov 11 14:46:00 2013 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,172 +0,0 @@
-/* $XConsortium: sharedlib.c,v 1.6 94/04/17 20:13:34 kaleb Exp $ */
-/*
-
-Copyright (c) 1991, 1994 X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from the X Consortium.
-
-*/
-
-#if defined(SUNSHLIB) && !defined(SHAREDCODE)
-
-#include <X11/IntrinsicP.h>
-#include <X11/Xaw/AsciiSinkP.h>
-#include <X11/Xaw/AsciiSrcP.h>
-#include <X11/Xaw/AsciiTextP.h>
-#include <X11/Xaw/MultiSinkP.h>
-#include <X11/Xaw/MultiSrcP.h>
-#include <X11/Xaw/BoxP.h>
-#include <X11/Xaw/CommandP.h>
-#include <X11/Xaw/DialogP.h>
-#include <X11/Xaw/FormP.h>
-#include <X11/Xaw/GripP.h>
-#include <X11/Xaw/LabelP.h>
-#include <X11/Xaw/ListP.h>
-#include <X11/Xaw/MenuButtoP.h>
-#include <X11/Xaw/PanedP.h>
-#include <X11/Xaw/PannerP.h>
-#include <X11/Xaw/PortholeP.h>
-#include <X11/Xaw/RepeaterP.h>
-#include <X11/Xaw/ScrollbarP.h>
-#include <X11/Xaw/SimpleP.h>
-#include <X11/Xaw/SimpleMenP.h>
-#include <X11/Xaw/SmeP.h>
-#include <X11/Xaw/SmeBSBP.h>
-#include <X11/Xaw/SmeLineP.h>
-#include <X11/Xaw/StripCharP.h>
-#include <X11/Xaw/TextP.h>
-#include <X11/Xaw/TextSinkP.h>
-#include <X11/Xaw/TextSrcP.h>
-#include <X11/Xaw/ToggleP.h>
-#include <X11/Xaw/TreeP.h>
-#include <X11/VendorP.h>
-#include <X11/Xaw/ViewportP.h>
-
-extern AsciiSinkClassRec asciiSinkClassRec;
-WidgetClass asciiSinkObjectClass = (WidgetClass)&asciiSinkClassRec;
-
-extern AsciiSrcClassRec asciiSrcClassRec;
-WidgetClass asciiSrcObjectClass = (WidgetClass)&asciiSrcClassRec;
-
-extern AsciiTextClassRec asciiTextClassRec;
-WidgetClass asciiTextWidgetClass = (WidgetClass)&asciiTextClassRec;
-
-#ifdef ASCII_STRING
-extern AsciiStringClassRec asciiStringClassRec;
-WidgetClass asciiStringWidgetClass = (WidgetClass)&asciiStringClassRec;
-#endif
-
-#ifdef ASCII_DISK
-extern AsciiDiskClassRec asciiDiskClassRec;
-WidgetClass asciiDiskWidgetClass = (WidgetClass)&asciiDiskClassRec;
-#endif
-
-extern MultiSinkClassRec multiSinkClassRec;
-WidgetClass multiSinkObjectClass = (WidgetClass)&multiSinkClassRec;
-
-extern MultiSrcClassRec multiSrcClassRec;
-WidgetClass multiSrcObjectClass = (WidgetClass)&multiSrcClassRec;
-
-extern BoxClassRec boxClassRec;
-WidgetClass boxWidgetClass = (WidgetClass)&boxClassRec;
-
-extern CommandClassRec commandClassRec;
-WidgetClass commandWidgetClass = (WidgetClass) &commandClassRec;
-
-extern DialogClassRec dialogClassRec;
-WidgetClass dialogWidgetClass = (WidgetClass)&dialogClassRec;
-
-extern FormClassRec formClassRec;
-WidgetClass formWidgetClass = (WidgetClass)&formClassRec;
-
-extern GripClassRec gripClassRec;
-WidgetClass gripWidgetClass = (WidgetClass) &gripClassRec;
-
-extern LabelClassRec labelClassRec;
-WidgetClass labelWidgetClass = (WidgetClass)&labelClassRec;
-
-extern ListClassRec listClassRec;
-WidgetClass listWidgetClass = (WidgetClass)&listClassRec;
-
-extern MenuButtonClassRec menuButtonClassRec;
-WidgetClass menuButtonWidgetClass = (WidgetClass) &menuButtonClassRec;
-
-extern PanedClassRec panedClassRec;
-WidgetClass panedWidgetClass = (WidgetClass) &panedClassRec;
-WidgetClass vPanedWidgetClass = (WidgetClass) &panedClassRec;
-
-extern PannerClassRec pannerClassRec;
-WidgetClass pannerWidgetClass = (WidgetClass) &pannerClassRec;
-
-extern PortholeClassRec portholeClassRec;
-WidgetClass portholeWidgetClass = (WidgetClass) &portholeClassRec;
-
-extern RepeaterClassRec repeaterClassRec;
-WidgetClass repeaterWidgetClass = (WidgetClass) &repeaterClassRec;
-
-extern ScrollbarClassRec scrollbarClassRec;
-WidgetClass scrollbarWidgetClass = (WidgetClass)&scrollbarClassRec;
-
-extern SimpleClassRec simpleClassRec;
-WidgetClass simpleWidgetClass = (WidgetClass)&simpleClassRec;
-
-extern SimpleMenuClassRec simpleMenuClassRec;
-WidgetClass simpleMenuWidgetClass = (WidgetClass)&simpleMenuClassRec;
-
-extern SmeClassRec smeClassRec;
-WidgetClass smeObjectClass = (WidgetClass) &smeClassRec;
-
-extern SmeBSBClassRec smeBSBClassRec;
-WidgetClass smeBSBObjectClass = (WidgetClass) &smeBSBClassRec;
-
-extern SmeLineClassRec smeLineClassRec;
-WidgetClass smeLineObjectClass = (WidgetClass) &smeLineClassRec;
-
-extern StripChartClassRec stripChartClassRec;
-WidgetClass stripChartWidgetClass = (WidgetClass) &stripChartClassRec;
-
-extern TextClassRec textClassRec;
-WidgetClass textWidgetClass = (WidgetClass)&textClassRec;
-
-unsigned long FMT8BIT = 0L;
-unsigned long XawFmt8Bit = 0L;
-unsigned long XawFmtWide = 0L;
-
-extern TextSinkClassRec textSinkClassRec;
-WidgetClass textSinkObjectClass = (WidgetClass)&textSinkClassRec;
-
-extern TextSrcClassRec textSrcClassRec;
-WidgetClass textSrcObjectClass = (WidgetClass)&textSrcClassRec;
-
-extern ToggleClassRec toggleClassRec;
-WidgetClass toggleWidgetClass = (WidgetClass) &toggleClassRec;
-
-extern TreeClassRec treeClassRec;
-WidgetClass treeWidgetClass = (WidgetClass) &treeClassRec;
-
-extern VendorShellClassRec vendorShellClassRec;
-WidgetClass vendorShellWidgetClass = (WidgetClass) &vendorShellClassRec;
-
-extern ViewportClassRec viewportClassRec;
-WidgetClass viewportWidgetClass = (WidgetClass)&viewportClassRec;
-
-#endif /* SUNSHLIB */
--- a/open-src/lib/libXdamage/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/lib/libXdamage/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -1,6 +1,6 @@
###############################################################################
#
-# Xdamage 1.x Makefile
+# Xlib-based client library for the X Damage extension
#
# Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
#
@@ -61,7 +61,7 @@
# configure includes xfixes in PKG_CHECK_MODULES since libXfixes headers &
# macros are used, but currently no functions are actually called, so we can
# ignore it when linking
-MODULE_LD_OPTIONS += -z ignore
+MODULE_LD_OPTIONS += $(ZDISCARD_UNUSED_DEP)
# Compatibility links from /usr/X11/lib to /usr/lib
MODULE_X11_LIBCOMPAT_LINKS = libXdamage.so libXdamage.so.1
--- a/open-src/lib/libXevie/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/lib/libXevie/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -2,7 +2,7 @@
#
# Xevie 1.x Makefile
#
-# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -58,9 +58,9 @@
# Link with version mapfile
MODULE_LD_OPTIONS = -M $(PWD)/mapfile-vers
-# libXevie actually doesn't call any libc functions, but even if we don't
-# pass -lc, the compiler sneaks it in, so we tell the linker to ignore it
-MODULE_LD_OPTIONS += -z ignore
+# libXevie actually doesn't call any libc functions, so we can discard
+# the -lc automatically added by MODTYPE_LDFLAGS in ../Makefile.inc
+MODULE_LD_OPTIONS += $(ZDISCARD_UNUSED_DEP)
# Compatibility links from /usr/X11/lib to /usr/lib
MODULE_X11_LIBCOMPAT_LINKS = libXevie.so libXevie.so.1
--- a/open-src/lib/libXp/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/lib/libXp/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -43,6 +43,8 @@
# we need to autoreconf
AUTORECONF=yes
+# Override the libraries pkg-config returns, to exclude the unneeded libXau
+MODULE_CONFIG_ENV = XPRINT_LIBS='-lX11 -lXext'
# Library name
LIBNAME=Xp
--- a/open-src/lib/libXpm/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/lib/libXpm/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -61,17 +61,25 @@
SUNTOUCH_MAN_FLAGS_libXpm.3lib = $(LIB_SUNTOUCH_DEFAULTS)
SUNTOUCH_MAN_FLAGS_libXpm.3lib += -r '{__xorgversion__, $(MODULE_NAME) $(MODULE_VERSION)}'
-# Link with version mapfile
-MODULE_LD_OPTIONS = -M $(PWD)/mapfile-vers
+# Link shared library with version mapfile
+MODULE_LD_SHARED_OPTIONS = -M $(PWD)/mapfile-vers
# pkg-config files that need to have -R added
FIX_PC_FILES=xpm.pc.in
# Additional arguments to pass to make
-MODULE_MAKEFLAGS= -e SUBDIRS="src include"
+# - in 32-bit builds, only install library, not apps or headers
+# - install 64-bit apps in default directory, not 64-bit subdir
+MODULE_INSTALL_MAKEFLAGS_32 = -e SUBDIRS="src"
+MODULE_INSTALL_MAKEFLAGS_64 = bindir=$(MODULE_PREFIX)/bin
+MODULE_INSTALL_MAKEFLAGS = $(MODULE_INSTALL_MAKEFLAGS_$(BUILD_TYPE))
-# Install documentation as well
-MODULE_ADD_INSTALL_TARGETS = install-docs
+# Install docs & l10n files as well
+MODULE_ADD_INSTALL_TARGETS_64 = install-docs install-po
+MODULE_ADD_INSTALL_TARGETS = $(MODULE_ADD_INSTALL_TARGETS_$(BUILD_TYPE))
+
+# Compatibility links from /usr/X11/bin to /usr/bin
+MODULE_X11_BINCOMPAT_LINKS = cxpm sxpm
# Compatibility links from /usr/X11/lib to /usr/lib
MODULE_X11_LIBCOMPAT_LINKS = libXpm.so libXpm.so.4
@@ -90,5 +98,10 @@
$(PROTODIR)$(3LIB_MAN_DIR)/libXpm.3lib: $(INSTALL_DEPS) $(PROTODIR)$(3LIB_MAN_DIR)
ginstall -m 0444 $(SOURCE_DIR)/man/libXpm.3lib $@
-$(PROTODIR)$(3LIB_MAN_DIR):
+PO_FILES = $(BUILD_DIR)/cxpm/cxpm.po $(BUILD_DIR)/sxpm/sxpm.po
+
+install-po: $(INSTALL_DEPS) $(PROTODIR)$(X11_LC_MESSAGES_DIR)
+ ginstall -m 0444 $(PO_FILES) $(PROTODIR)$(X11_LC_MESSAGES_DIR)
+
+$(PROTODIR)$(3LIB_MAN_DIR) $(PROTODIR)$(X11_LC_MESSAGES_DIR):
mkdir -p $@
--- a/open-src/lib/libXtst/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/lib/libXtst/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -59,7 +59,7 @@
# configure includes xi in PKG_CHECK_MODULES since libXi headers & macros
# are used, but currently no functions are actually linked with, so we can
# ignore it when linking
-MODULE_LD_OPTIONS += -z ignore
+MODULE_LD_OPTIONS += $(ZDISCARD_UNUSED_DEP)
# pkg-config files that need to have -R added
FIX_PC_FILES=xtst.pc.in
--- a/open-src/lib/libXvMC/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/lib/libXvMC/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -55,6 +55,6 @@
# configure passes "xv" to PKG_CHECK_MODULES since libXv headers are needed,
# but we don't need to link with it, so ignore it at link time.
-MODULE_LDFLAGS = -z ignore
+MODULE_LDFLAGS = $(ZDISCARD_UNUSED_DEP)
include ../Makefile.inc
--- a/open-src/lib/libdga/sun-src/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/lib/libdga/sun-src/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -2,7 +2,7 @@
#
# libdga Makefile
#
-# Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -25,7 +25,7 @@
#
#
-SHLIBLDFLAGS = -G -z defs $(LDFLAGS)
+SHLIBLDFLAGS = -G -z defs -z text $(LDFLAGS)
REQUIREDLIBS = -lX11 -lsocket -lc
DEFINES = -D_TS_ERRNO -DMT -DXTHREADS -DPANORAMIX -DIPv6 -DSVR4
--- a/open-src/lib/libdrm/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/lib/libdrm/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -72,8 +72,6 @@
#MODULE_CFLAGS = -xspace
-MODULE_BUILD_MAKEFLAGS = libkms_la_LIBADD=../libdrm.so.2
-
# Command line options to GNU autoconf configure script
MODULE_CONFIG_OPTS = --enable-libkms --disable-nouveau
@@ -92,6 +90,7 @@
# Where to install files
MODULE_ADD_LIB_SUBDIR = $(X11_SERVERLIBS_SUBDIR)
+MODULE_LDFLAGS = -R $(MODULE_PREFIX)/lib$(MODULE_ADD_LIB_SUBDIR)$(ARCHLIBSUBDIR)
MODULE_PKGCONFIG_DIR = $(PKGCONFIG_DIR)
MODULE_PKGCONFIG_DIR_SET = yes
--- a/open-src/lib/libglu/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/lib/libglu/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -1,6 +1,6 @@
###############################################################################
#
-# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -55,13 +55,12 @@
GIT_URL_SET=yes
# Patches to apply to source after unpacking, in order
-SOURCE_PATCHES=glu-exports.patch
+SOURCE_PATCHES=
-# Regenerate Makefile.in's from Makefile.am's after applying glu-exports.patch
-AUTORECONF=yes
-
-# delibtoolize does not get along with glu-exports.patch
-DELIBTOOLIZE = no
+# Use -KPIC instead of -Kpic because we have too many symbols on SPARC
+DELIBTOOLIZE_FLAGS_sparc = -P
+DELIBTOOLIZE_FLAGS_i386 =
+DELIBTOOLIZE_FLAGS = $(DELIBTOOLIZE_FLAGS_$(MACH))
# pkg-config files to update
FIX_PC_FILES=glu.pc.in
@@ -89,56 +88,53 @@
# Without this flag, Studio 12 binaries are almost 2x bigger (CR 6808868)
#MODULE_CFLAGS = -xspace
-# Add include paths and linker paths needed for DRM modules
-MODULE_CPPFLAGS = -I$(PROTODIR)/usr/include/libdrm
-
-MODULE_LDFLAGS= -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
- -R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) -z ignore
-
### Include common rulesets
include ../Makefile.inc
HEADERS_TO_MOVE = glu.h glu_mangle.h
HEADERS_TO_DIRECT_LINK = glu.h
-LIBRARY_TO_LINK = libGLU.so.1.3.1
+LIBRARY_TO_LINK = libGLU.so.1
# Run just once after all other install steps are done for both 32/64-bit
install: install_ogl_layout
install_ogl_layout:
- -rm -f $(PROTODIR)/usr/lib/libGLU.so.1
- -rm -f $(PROTODIR)/usr/lib/libGLU.so
- -rm -f $(PROTODIR)/usr/lib/$(SUBDIR64)/libGLU.so.1
- -rm -f $(PROTODIR)/usr/lib/$(SUBDIR64)/libGLU.so
- mv $(PROTODIR)/usr/include/GL/glu.h $(PROTODIR)/usr/include/mesa
- mv $(PROTODIR)/usr/include/GL/glu_mangle.h $(PROTODIR)/usr/include/mesa
+ mv -f $(PROTODIR)/usr/include/GL/glu.h \
+ $(PROTODIR)/usr/include/GL/glu_mangle.h \
+ $(PROTODIR)/usr/include/mesa/
ln -s $(HEADERS_TO_DIRECT_LINK:%=../mesa/%) \
$(PROTODIR)/usr/include/GL
mkdir -p $(PROTODIR)/usr/lib/GL/$(SUBDIR64) \
$(PROTODIR)/usr/lib/mesa/$(SUBDIR64)
- mv $(LIBRARY_TO_LINK:%=$(PROTODIR)/usr/lib/%) \
+ mv -f $(LIBRARY_TO_LINK:%=$(PROTODIR)/usr/lib/%) \
$(PROTODIR)/usr/lib/mesa/
- mv $(LIBRARY_TO_LINK:%=$(PROTODIR)/usr/lib/$(SUBDIR64)/%) \
+ mv -f $(LIBRARY_TO_LINK:%=$(PROTODIR)/usr/lib/$(SUBDIR64)/%) \
$(PROTODIR)/usr/lib/mesa/$(SUBDIR64)/
- ln -s libGLU.so.1.3.1 $(PROTODIR)/usr/lib/mesa/libGLU.so.1
+ -rm -f $(PROTODIR)/usr/lib/mesa/libGLU.so
ln -s libGLU.so.1 $(PROTODIR)/usr/lib/mesa/libGLU.so
- ln -s libGLU.so.1.3.1 $(PROTODIR)/usr/lib/mesa/$(SUBDIR64)/libGLU.so.1
+ -rm -f $(PROTODIR)/usr/lib/mesa/$(SUBDIR64)/libGLU.so
ln -s libGLU.so.1 $(PROTODIR)/usr/lib/mesa/$(SUBDIR64)/libGLU.so
- (cd $(PROTODIR)/usr/lib/GL; ln -s $(LIBRARY_TO_LINK:%=../mesa/%) .)
- ln -s libGLU.so.1.3.1 $(PROTODIR)/usr/lib/GL/libGLU.so.1
+ (cd $(PROTODIR)/usr/lib/GL; rm -f $(LIBRARY_TO_LINK) ; \
+ ln -s $(LIBRARY_TO_LINK:%=../mesa/%) .)
+ -rm -f $(PROTODIR)/usr/lib/GL/libGLU.so
ln -s libGLU.so.1 $(PROTODIR)/usr/lib/GL/libGLU.so
- (cd $(PROTODIR)/usr/lib/GL/$(SUBDIR64); ln -s $(LIBRARY_TO_LINK:%=../../mesa/$(SUBDIR64)/%) .)
- ln -s libGLU.so.1.3.1 $(PROTODIR)/usr/lib/GL/$(SUBDIR64)/libGLU.so.1
+ (cd $(PROTODIR)/usr/lib/GL/$(SUBDIR64); rm -f $(LIBRARY_TO_LINK) ; \
+ ln -s $(LIBRARY_TO_LINK:%=../../mesa/$(SUBDIR64)/%) .)
+ -rm -f $(PROTODIR)/usr/lib/GL/$(SUBDIR64)/libGLU.so
ln -s libGLU.so.1 $(PROTODIR)/usr/lib/GL/$(SUBDIR64)/libGLU.so
- (cd $(PROTODIR)/usr/lib; ln -s $(LIBRARY_TO_LINK:%=GL/%) .)
- ln -s libGLU.so.1.3.1 $(PROTODIR)/usr/lib/libGLU.so.1
+ (cd $(PROTODIR)/usr/lib; rm -f $(LIBRARY_TO_LINK) ; \
+ ln -s $(LIBRARY_TO_LINK:%=GL/%) .)
+ -rm -f $(PROTODIR)/usr/lib/libGLU.so
ln -s libGLU.so.1 $(PROTODIR)/usr/lib/libGLU.so
- (cd $(PROTODIR)/usr/lib/$(SUBDIR64); ln -s $(LIBRARY_TO_LINK:%=../GL/$(SUBDIR64)/%) .)
- ln -s libGLU.so.1.3.1 $(PROTODIR)/usr/lib/$(SUBDIR64)/libGLU.so.1
+ (cd $(PROTODIR)/usr/lib/$(SUBDIR64); rm -f $(LIBRARY_TO_LINK) ; \
+ ln -s $(LIBRARY_TO_LINK:%=../GL/$(SUBDIR64)/%) .)
+ -rm -f $(PROTODIR)/usr/lib/$(SUBDIR64)/libGLU.so
ln -s libGLU.so.1 $(PROTODIR)/usr/lib/$(SUBDIR64)/libGLU.so
- (cd $(PROTODIR)/usr/X11/lib; ln -s $(LIBRARY_TO_LINK:%=GL/%) .)
- ln -s libGLU.so.1.3.1 $(PROTODIR)/usr/X11/lib/libGLU.so.1
+ (cd $(PROTODIR)/usr/X11/lib; rm -f $(LIBRARY_TO_LINK) ; \
+ ln -s $(LIBRARY_TO_LINK:%=GL/%) .)
+ -rm -f $(PROTODIR)/usr/X11/lib/libGLU.so
ln -s libGLU.so.1 $(PROTODIR)/usr/X11/lib/libGLU.so
- (cd $(PROTODIR)/usr/X11/lib/$(SUBDIR64); ln -s $(LIBRARY_TO_LINK:%=../GL/$(SUBDIR64)/%) .)
- ln -s libGLU.so.1.3.1 $(PROTODIR)/usr/X11/lib/$(SUBDIR64)/libGLU.so.1
+ (cd $(PROTODIR)/usr/X11/lib/$(SUBDIR64); rm -f $(LIBRARY_TO_LINK) ; \
+ ln -s $(LIBRARY_TO_LINK:%=../GL/$(SUBDIR64)/%) .)
+ -rm -f $(PROTODIR)/usr/X11/lib/$(SUBDIR64)/libGLU.so
ln -s libGLU.so.1 $(PROTODIR)/usr/X11/lib/$(SUBDIR64)/libGLU.so
--- a/open-src/lib/libglu/glu-exports.patch Mon Nov 11 14:46:00 2013 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
---- Makefile.am Mon Sep 17 14:03:38 2012
-+++ Makefile.am Tue Jul 9 12:56:59 2013
-@@ -131,7 +131,7 @@
- src/libnurbs/nurbtess/sampledLine.cc \
- src/libnurbs/nurbtess/searchTree.cc
- libGLU_la_LIBADD = $(GL_LIBS) $(OSMESA_LIBS)
--libGLU_la_LDFLAGS = -version-number $(GLU_LIBRARY_VERSION) -no-undefined -export-symbols-regex '^glu'
-+libGLU_la_LDFLAGS = -version-number $(GLU_LIBRARY_VERSION) -no-undefined -export-symbols-regex 'glu'
-
- EXTRA_DIST = \
- include/GL/glu.h \
--- a/open-src/lib/liblbxutil/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/lib/liblbxutil/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -66,6 +66,7 @@
MODULE_CONFIG_OPTS = --enable-shared=no --enable-static=yes
MODULE_CONFIG_OPTS += --libdir='$${exec_prefix}/lib$(ARCHLIBSUBDIR)'
MODULE_CFLAGS = $(PROG_CFLAGS)
+MODULE_CPPFLAGS = $(PROG_CPPFLAGS)
MODULE_ADD_UNINSTALLED_PC_OPS = -e 's|$$protodir|$(TOOLS_DIR)|g;' \
-e 's|^Libs: |Libs: -L$(TOOLS_DIR)/\$${libdir}|g;'
MODULE_INSTALL_MAKEFLAGS = DESTDIR=$(TOOLS_DIR)
--- a/open-src/lib/libxcb/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/lib/libxcb/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -60,7 +60,7 @@
MODULE_MTLEVEL_SET=yes
LIB_MAN_SUFFIX=3xcb
-MODULE_LD_OPTIONS = -z ignore -lc
+MODULE_LD_OPTIONS = $(ZDISCARD_UNUSED_DEP) -lc
LD_LIBRARY_PATH=$(PROTODIR)/usr/lib$(ARCHLIBSUBDIR)
# Command line options to GNU autoconf configure script
--- a/open-src/lib/mesa/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/lib/mesa/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -1,6 +1,6 @@
###############################################################################
#
-# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -67,16 +67,9 @@
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES= \
CVE-2013-1993.patch,-p1 \
- install-pc-dir.patch \
solaris-port.patch \
mesa9-port.patch
-# File created by running configure script
-AUTOCONF_TARGET=$(SOURCE_DIR)/configs/autoconf
-AUTOCONF_TARGET_SET=yes
-MODULE_ADD_CONFIGURE_TARGETS=set_pc_dir
-MODULE_INSTALL_DEPS=set_pc_dir
-
# Regenerate configure after patching configure.ac in mesa9-port.patch
AUTORECONF=yes
@@ -116,12 +109,6 @@
# Without this flag, Studio 12 binaries are almost 2x bigger (CR 6808868)
#MODULE_CFLAGS = -xspace
-# Add include paths and linker paths needed for DRM modules
-MODULE_CPPFLAGS = -I$(PROTODIR)/usr/include/libdrm
-
-MODULE_LDFLAGS= -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
- -R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) -z ignore
-
MODULE_LD_OPTIONS += -M $(PWD)/mapfile.externs
# Merge in additional sources from sun-src directory
@@ -133,10 +120,6 @@
### Include common rulesets
include ../Makefile.inc
-# Mesa makefiles use a different variable name/method for pkgconfig path
-set_pc_dir: $(AUTOCONF_TARGET)
- echo 'INSTALL_PC_DIR=$(PKGCONFIG_DIR)' >> $(AUTOCONF_TARGET)
-
# Move installed files to mesa subdirs and make links back
LIBRARIES_TO_LINK = libGL.so.1.2.0 libdricore9.0.3.so.1.0.0 libglapi.so.0.0.0
MESA_LIBDIR = $(PROTODIR)/usr/lib/mesa$(ARCHLIBSUBDIR)
--- a/open-src/lib/mesa/install-pc-dir.patch Mon Nov 11 14:46:00 2013 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
---- configs/default Wed Jun 19 13:39:19 2013
-+++ configs/default Wed Jun 19 13:39:50 2013
-@@ -131,6 +131,7 @@
- INSTALL_DIR = /usr/local
- INSTALL_LIB_DIR = $(INSTALL_DIR)/$(LIB_DIR)
- INSTALL_INC_DIR = $(INSTALL_DIR)/include
-+INSTALL_PC_DIR = $(INSTALL_LIB_DIR)/pkgconfig
- DRI_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/dri
-
- # Where libGL will look for DRI hardware drivers
--- a/open-src/lib/pixman/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/lib/pixman/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -84,4 +84,7 @@
# building in our builds.
MODULE_CONFIG_OPTS = --disable-gtk
+# Discard unneeded libraries & files that get linked into many test programs
+MODULE_LD_OPTIONS = $(ZDISCARD_UNUSED_DEP) $(ZDISCARD_UNUSED_FIL)
+
include ../Makefile.inc
--- a/open-src/util/build-tools/sun-src/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/util/build-tools/sun-src/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -32,7 +32,7 @@
$(CC) -Kpic $(CFLAGS) -c -o $@ $<
time-%.so: time-%.o
- $(CC) -G $(CFLAGS) -o $@ $<
+ $(CC) -G $(CFLAGS) -o $@ $< -lc
clean:
$(RM) time-*.o time-*.so
--- a/open-src/xserver/Makefile.inc Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/xserver/Makefile.inc Sat Mar 14 12:06:11 2015 -0700
@@ -108,9 +108,11 @@
MODTYPE_CXXFLAGS=$(PROG_CXXFLAGS)
MODTYPE_LDFLAGS=$(PROG_LDFLAGS)
-# configure scripts add libraries like -lsocket & -lnsl to the global $(LIBS)
-# when only some objects need them, so ignore them in the rest.
-MODTYPE_LD_OPTIONS = -z ignore
+# configure scripts add libraries like -lm to the global $(LIBS) when only
+# some objects need them, so discard them in the rest, but only when building
+# programs or .so's, not the Dtrace magic relocatable objects.
+MODTYPE_LD_EXEC_OPTIONS = $(ZDISCARD_UNUSED_DEP) $(ZDISCARD_UNUSED_FIL)
+MODTYPE_LD_SHARED_OPTIONS = $(ZDISCARD_UNUSED_DEP) $(ZDISCARD_UNUSED_FIL)
# Environment variable options to use when building
# - PATH - include /usr/sbin for dtrace command (needed for building probes)
--- a/open-src/xserver/xorg/16418361.patch Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/xserver/xorg/16418361.patch Sat Mar 14 12:06:11 2015 -0700
@@ -1,17 +1,21 @@
---- a/hw/xfree86/modes/xf86cvt.c Sat Oct 13 16:38:50 2012
-+++ b/hw/xfree86/modes/xf86cvt.c Thu Feb 28 13:00:17 2013
-@@ -63,6 +63,14 @@
- * want that. -- libv
- *
- */
+diff --git a/hw/xfree86/utils/cvt/cvt.c b/hw/xfree86/utils/cvt/cvt.c
+index 9483964..752b35c 100644
+--- a/hw/xfree86/utils/cvt/cvt.c
++++ b/hw/xfree86/utils/cvt/cvt.c
+@@ -23,6 +23,16 @@
+
+ /* Standalone VESA CVT standard timing modelines generator. */
+
+
-+/* this should be removed once we figure out why ld is complaining
-+ even though these are included in the mapfile - 16418361 */
++/* These are needed for building the standalone cvt utility using code that
++ was built against headers expecting these to be defined in dix/regions.o
++ Oracle bug 16418361 */
+#if (defined(__sparc__) || defined(__sparc))
-+extern _X_EXPORT BoxRec RegionEmptyBox = { 0, 0, 0, 0 };
-+extern _X_EXPORT RegDataRec RegionEmptyData = { 0, 0 };
++#include "regionstr.h"
++_X_EXPORT BoxRec RegionEmptyBox = { 0, 0, 0, 0 };
++_X_EXPORT RegDataRec RegionEmptyData = { 0, 0 };
+#endif
+
- DisplayModePtr
- xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, Bool Reduced,
- Bool Interlaced)
+ #include "xf86.h"
+
+ /* FatalError implementation used by the server code we built in */
--- a/open-src/xserver/xorg/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/xserver/xorg/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -2,7 +2,7 @@
#
# Xorg server Makefile
#
-# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -155,13 +155,16 @@
# from the Xorg binary itself
XORG_EXTERNS_FLAG = -Wl,-M,$(PWD)/$(XORG_EXTERNS_FILE)
MODULE_BUILD_ENV = XORG_EXTERNS_FLAG='$(XORG_EXTERNS_FLAG)'
-MODULE_LDFLAGS += $(XORG_EXTERNS_FLAG)
+MODULE_LD_SHARED_OPTIONS += -M $(PWD)/$(XORG_EXTERNS_FILE)
+
+# Disable direct binding in shared objects, since it breaks libglx.so
+MODULE_BUILD_ENV += LD_SHARED_UNSET="-B direct"
# Optimization doesn't always remove unused inline functions, leaving many
-# binaries referencing pixman symbols that normally don't need them. Using
-# -z ignore should ensure that it's not added when not really needed.
-# Adding -z muldefs for 16418361 - which should be removed once we fix that
-MODULE_CONFIG_OPTS += LIBS="-z ignore -lpixman-1 -z muldefs"
+# binaries referencing pixman symbols that normally don't need them. The
+# $(ZDISCARD_UNUSED_DEP) in LD_OPTIONS should avoid adding it when
+# not really needed.
+MODULE_CONFIG_OPTS += LIBS="-lpixman-1"
# pkg-config files that need to have -R added
FIX_PC_FILES=xorg-server.pc.in
--- a/open-src/xserver/xorg/dixmods-deps.patch Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/xserver/xorg/dixmods-deps.patch Sat Mar 14 12:06:11 2015 -0700
@@ -1,6 +1,37 @@
---- a/hw/xfree86/Makefile.am Wed Sep 12 10:56:31 2012
-+++ b/hw/xfree86/Makefile.am Wed Sep 12 11:02:17 2012
-@@ -25,10 +25,10 @@
+diff --git a/configure.ac b/configure.ac
+index 28537ac..09d4d9a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -221,6 +221,8 @@ AC_REPLACE_FUNCS([strcasecmp strcasestr strlcat strlcpy strndup])
+ dnl Find the math libary, then check for cbrt function in it.
+ AC_CHECK_LIB(m, sqrt)
+ AC_CHECK_FUNCS([cbrt])
++# But we don't want to link everything with libm
++LIBS="${LIBS//-lm}"
+
+ dnl Check for libtsol for Solaris Trusted Extensions module
+ AC_CHECK_LIB(tsol, bsllow, [BUILD_TSOL_MODULE=yes], [BUILD_TSOL_MODULE=no])
+@@ -1092,7 +1094,6 @@ AM_CONDITIONAL(AIGLX_DRI_LOADER, { test "x$DRI" = xyes || test "x$DRI2" = xyes;
+
+ if test "x$GLX_USE_TLS" = xyes ; then
+ GLX_DEFINES="-DGLX_USE_TLS -DPTHREADS"
+- GLX_SYS_LIBS="$GLX_SYS_LIBS -lpthread"
+ fi
+ AC_SUBST([GLX_DEFINES])
+ AC_SUBST([GLX_SYS_LIBS])
+@@ -1516,6 +1517,7 @@ XSERVER_CFLAGS="${XSERVER_CFLAGS} ${XSERVERCFLAGS_CFLAGS}"
+ XSERVER_LIBS="$DIX_LIB $MI_LIB $OS_LIB"
+ XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS}"
+ XSERVER_SYS_LIBS="${XSERVER_SYS_LIBS} -lproject"
++XSERVER_SYS_LIBS="${XSERVER_SYS_LIBS} -lm"
+ AC_SUBST([XSERVER_LIBS])
+ AC_SUBST([XSERVER_SYS_LIBS])
+
+diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
+index c3899b5..36ca3d6 100644
+--- a/hw/xfree86/Makefile.am
++++ b/hw/xfree86/Makefile.am
+@@ -25,10 +25,10 @@ if INT10MODULE
INT10_SUBDIR = int10
endif
@@ -15,7 +46,7 @@
DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \
parser ramdac shadowfb vbe vgahw \
-@@ -38,7 +38,7 @@
+@@ -38,7 +38,7 @@ DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \
bin_PROGRAMS = Xorg
nodist_Xorg_SOURCES = sdksyms.c
@@ -24,9 +55,57 @@
INCLUDES = $(XORG_INCS) -I$(srcdir)/parser -I$(top_srcdir)/miext/cw \
-I$(srcdir)/ddc -I$(srcdir)/i2c -I$(srcdir)/modes -I$(srcdir)/ramdac \
-I$(srcdir)/dri -I$(srcdir)/dri2
---- a/hw/xfree86/i2c/Makefile.am Fri Sep 14 10:37:31 2012
-+++ b/hw/xfree86/i2c/Makefile.am Fri Sep 14 10:38:21 2012
-@@ -22,22 +22,29 @@
+@@ -123,6 +123,9 @@ include $(SDKSYMS_DEP)
+ i2c/libi2c.la:
+ $(AM_V_at)cd i2c && $(MAKE) libi2c.la
+
++modes/libxf86modes.la:
++ $(AM_V_at)cd modes && $(MAKE) libxf86modes.la
++
+ dixmods/libdixmods.la:
+ $(AM_V_at)cd dixmods && $(MAKE) libdixmods.la
+
+diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am
+index c02677a..a9557b0 100644
+--- a/hw/xfree86/dixmods/Makefile.am
++++ b/hw/xfree86/dixmods/Makefile.am
+@@ -18,7 +18,9 @@ INCLUDES = @XORG_INCS@ \
+ -I$(top_srcdir)/glx
+
+ libfb_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
++libfb_la_LDFLAGS += $(XORG_EXTERNS_FLAG)
+ libfb_la_LIBADD = $(top_builddir)/fb/libfb.la
++libfb_la_LIBADD += -lpixman-1
+ libfb_la_SOURCES = $(top_builddir)/fb/fbcmap_mi.c fbmodule.c
+ libfb_la_CFLAGS = $(AM_CFLAGS)
+
+@@ -28,9 +30,12 @@ libwfb_la_SOURCES = $(top_builddir)/fb/fbcmap_mi.c fbmodule.c
+ libwfb_la_CFLAGS = $(AM_CFLAGS) -DFB_ACCESS_WRAPPER
+
+ libglx_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
++libglx_la_LDFLAGS += $(XORG_EXTERNS_FLAG)
+ libglx_la_LIBADD = $(top_builddir)/glx/libglx.la $(GLX_SYS_LIBS)
+ if AIGLX_DRI_LOADER
+ libglx_la_LIBADD += $(top_builddir)/glx/libglxdri.la
++libglx_la_LDFLAGS += -R$(extsmoduledir)
++libglx_la_LDFLAGS += $(LIBDRM_LIBS)
+ if NO_UNDEFINED
+ libglx_la_LIBADD += ../dri/libdri.la ../dri2/libdri2.la
+ endif
+@@ -39,6 +44,8 @@ libglx_la_SOURCES = glxmodule.c
+
+ libshadow_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
+ libshadow_la_LIBADD = $(top_builddir)/miext/shadow/libshadow.la
++libshadow_la_DEPENDENCIES = libfb.la
++libshadow_la_LDFLAGS += $(XORG_EXTERNS_FLAG)
+ if NO_UNDEFINED
+ libshadow_la_LIBADD += libfb.la
+ endif
+diff --git a/hw/xfree86/i2c/Makefile.am b/hw/xfree86/i2c/Makefile.am
+index cb18db1..06cd033 100644
+--- a/hw/xfree86/i2c/Makefile.am
++++ b/hw/xfree86/i2c/Makefile.am
+@@ -22,22 +22,30 @@ sdk_HEADERS = xf86i2c.h bt829.h fi1236.h msp3430.h tda8425.h tda9850.h tda9885.h
# i2c drivers
#
bt829_drv_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
@@ -35,6 +114,7 @@
fi1236_drv_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
+fi1236_drv_la_LDFLAGS += $(XORG_EXTERNS_FLAG)
++fi1236_drv_la_LIBADD = -lm
fi1236_drv_la_SOURCES = fi1236.c fi1236.h fi1236_module.c tda9885.c
msp3430_drv_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
@@ -56,70 +136,48 @@
uda1380_drv_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
+uda1380_drv_la_LDFLAGS += $(XORG_EXTERNS_FLAG)
uda1380_drv_la_SOURCES = uda1380.c uda1380.h uda1380_module.c
---- a/hw/xfree86/dixmods/Makefile.am Wed Sep 12 11:02:30 2012
-+++ b/hw/xfree86/dixmods/Makefile.am Wed Sep 12 11:04:21 2012
-@@ -18,7 +18,9 @@
- -I$(top_srcdir)/glx
-
- libfb_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
-+libfb_la_LDFLAGS += $(XORG_EXTERNS_FLAG)
- libfb_la_LIBADD = $(top_builddir)/fb/libfb.la
-+libfb_la_LIBADD += -lpixman-1
- libfb_la_SOURCES = $(top_builddir)/fb/fbcmap_mi.c fbmodule.c
- libfb_la_CFLAGS = $(AM_CFLAGS)
-
-@@ -28,9 +30,12 @@
- libwfb_la_CFLAGS = $(AM_CFLAGS) -DFB_ACCESS_WRAPPER
-
- libglx_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
-+libglx_la_LDFLAGS += $(XORG_EXTERNS_FLAG)
- libglx_la_LIBADD = $(top_builddir)/glx/libglx.la $(GLX_SYS_LIBS)
- if AIGLX_DRI_LOADER
- libglx_la_LIBADD += $(top_builddir)/glx/libglxdri.la
-+libglx_la_LDFLAGS += -R$(extsmoduledir)
-+libglx_la_LDFLAGS += $(LIBDRM_LIBS)
- if NO_UNDEFINED
- libglx_la_LIBADD += ../dri/libdri.la ../dri2/libdri2.la
- endif
-@@ -39,6 +44,9 @@
-
- libshadow_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
- libshadow_la_LIBADD = $(top_builddir)/miext/shadow/libshadow.la
-+libshadow_la_DEPENDENCIES = libfb.la
-+libshadow_la_LDFLAGS +=
-+libshadow_la_LDFLAGS += $(XORG_EXTERNS_FLAG)
- if NO_UNDEFINED
- libshadow_la_LIBADD += libfb.la
- endif
---- a/hw/xfree86/shadowfb/Makefile.am Fri Sep 14 14:22:33 2012
-+++ b/hw/xfree86/shadowfb/Makefile.am Fri Sep 14 14:23:16 2012
-@@ -8,3 +8,7 @@
+diff --git a/hw/xfree86/shadowfb/Makefile.am b/hw/xfree86/shadowfb/Makefile.am
+index 5756fca..6ec3116 100644
+--- a/hw/xfree86/shadowfb/Makefile.am
++++ b/hw/xfree86/shadowfb/Makefile.am
+@@ -8,3 +8,7 @@ sdk_HEADERS = shadowfb.h
INCLUDES = $(XORG_INCS)
AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
+
-+libshadowfb_la_LDFLAGS += -z ignore $(XORG_EXTERNS_FLAG)
-+libshadowfb_la_LIBADD = $(XSERVER_SYS_LIBS) -lXfont
++libshadowfb_la_LDFLAGS += $(XORG_EXTERNS_FLAG)
++libshadowfb_la_LIBADD += -lXfont
+
---- a/hw/xfree86/vbe/Makefile.am Fri Sep 14 14:24:05 2012
-+++ b/hw/xfree86/vbe/Makefile.am Fri Sep 14 14:24:16 2012
-@@ -11,3 +11,7 @@
+diff --git a/hw/xfree86/utils/gtf/Makefile.am b/hw/xfree86/utils/gtf/Makefile.am
+index f77bf60..64a7362 100644
+--- a/hw/xfree86/utils/gtf/Makefile.am
++++ b/hw/xfree86/utils/gtf/Makefile.am
+@@ -24,4 +24,6 @@ bin_PROGRAMS = gtf
+
+ gtf_SOURCES = gtf.c
+ gtf_CFLAGS = $(XORG_CFLAGS)
+-gtf_LDADD = -lm
++# Include -lc as workaround for bug 17815318 so libm can actually go away
++# if -xlibmil manages to inline all math functions.
++gtf_LDADD = -lc -lm
+diff --git a/hw/xfree86/vbe/Makefile.am b/hw/xfree86/vbe/Makefile.am
+index 0b24faf..40ba628 100644
+--- a/hw/xfree86/vbe/Makefile.am
++++ b/hw/xfree86/vbe/Makefile.am
+@@ -11,3 +11,5 @@ AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \
-I$(srcdir)/../int10
+
+libvbe_la_LDFLAGS += $(XORG_EXTERNS_FLAG)
-+libvbe_la_LIBADD = ../int10/libint10.la
-+
---- a/hw/xfree86/Makefile.am Fri Sep 14 14:24:31 2012
-+++ b/hw/xfree86/Makefile.am Fri Sep 14 14:25:47 2012
-@@ -123,6 +123,9 @@
- i2c/libi2c.la:
- $(AM_V_at)cd i2c && $(MAKE) libi2c.la
-
-+modes/libxf86modes.la:
-+ $(AM_V_at)cd modes && $(MAKE) libxf86modes.la
-+
- dixmods/libdixmods.la:
- $(AM_V_at)cd dixmods && $(MAKE) libdixmods.la
-
+diff --git a/hw/xfree86/vgahw/Makefile.am b/hw/xfree86/vgahw/Makefile.am
+index f48e46a..5b69aad 100644
+--- a/hw/xfree86/vgahw/Makefile.am
++++ b/hw/xfree86/vgahw/Makefile.am
+@@ -1,5 +1,6 @@
+ module_LTLIBRARIES = libvgahw.la
+ libvgahw_la_LDFLAGS = -avoid-version
++libvgahw_la_LIBADD = $(PCIACCESS_LIBS)
+ libvgahw_la_SOURCES = vgaHW.c vgaHWmodule.c
+ INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c
+ AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
--- a/open-src/xserver/xorg/sun-src/os/solaris/mdb/modules/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/xserver/xorg/sun-src/os/solaris/mdb/modules/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -27,12 +27,13 @@
CFLAGS += -K pic -g
CPPFLAGS += -I $(top_srcdir)/include -I $(top_srcdir) -I $(top_srcdir)/Xext
CPPFLAGS += -I $(top_builddir)/include
-LDFLAGS = -Wl,-z,parent=/usr/bin/$(ARCHLIBSUBDIR)/mdb -Wl,-z,text -M mapfile
+LDFLAGS += -Wl,-z,direct -Wl,-z,text -M mapfile -lc
+LDFLAGS += -Wl,-z,parent=/usr/bin$(ARCHLIBSUBDIR)/mdb
HEADERS = Xserver_mdb.h
SOURCES = Xserver_clients.c Xserver_device_grabs.c mdb_module.c
OBJECTS = $(SOURCES:%.c=%.o)
-LINTFILES = $(SOURCES:%.so=%.ln)
+LINTFILES = $(SOURCES:%.c=%.ln)
all: $(MODULES)
--- a/open-src/xserver/xvnc/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/open-src/xserver/xvnc/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -198,8 +198,9 @@
# The X server unit tests currently depend on the Xorg ddx being built
XVNC_CONFIG_OPTS += --disable-unit-tests
-# Workaround libtool dropping -R paths
-MODULE_LDFLAGS += -Wl,-R,$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR)
+# Include -lc as workaround for bug 17815318 so libm can actually go away
+# if -xlibmil manages to inline all math functions.
+MODULE_LDFLAGS += -lc -lm
MODULE_CPPFLAGS = \
-D_XOPEN_SOURCE=500 -D__EXTENSIONS__ \
@@ -227,9 +228,7 @@
$(DEFAULT_BUILD_COMMAND:@DIR@=$(XORG_BUILD_DIR))
Xvnc_install_server: $(BUILD_TARGETS)
- (cd $(XORG_BUILD_DIR)/hw/vnc \
- && $(BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_INSTALL_MAKEFLAGS) \
- CPPROG="cp -p" install)
+ $(DEFAULT_INSTALL_COMMAND:@DIR@=$(XORG_BUILD_DIR)/hw/vnc) install
rm -f $(PROTODIR)/$(X11_SERVERMODS_DIR)/extensions/libvnc.so
Xvnc_install_programs: $(BUILD_TARGETS)
@@ -272,7 +271,7 @@
-rm -rf $(JAVA_INSTALL_DIR)
mkdir -p $(JAVA_INSTALL_DIR)
$(DEFAULT_INSTALL_COMMAND:@DIR@=$(JAVA_BUILD_DIR)/vncviewer) \
- install INSTALL_DIR=$(JAVA_INSTALL_DIR)
+ install INSTALL_DIR=$(JAVA_INSTALL_DIR)
$(INSTALL_SCRIPT) -m 0444 $(JAVA_SOURCE_DIR)/vncviewer/README \
$(JAVA_SOURCE_DIR)/vncviewer/LICENCE.TXT \
$(JAVA_INSTALL_DIR)
--- a/pkg/Makefile Mon Nov 11 14:46:00 2013 -0800
+++ b/pkg/Makefile Sat Mar 14 12:06:11 2015 -0700
@@ -2,7 +2,7 @@
#
# Makefile for X Consolidation packages
#
-# Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -514,8 +514,9 @@
check: protocmp pmodes lint check-pkgfmt
# Instead of fixing all the upstream packages to follow our permission rules
-# just fix the proto area to match our rules
+# just fix the files in these subdirs of the proto area to match our rules.
+FIX_PERMS_IN = /usr /lib /etc/X11 /etc/fonts /etc/hal
fix_perms:
@print "## Fixing proto area permissions"
- $(PKGDEBUG)find $(PKGROOT) -type f -exec chmod a-w \{\} \+
+ $(PKGDEBUG)find $(FIX_PERMS_IN:%=$(PKGROOT)%) -type f -exec chmod a-w \{\} \+
--- a/pkg/manifests/x11-library-mesa.p5m Mon Nov 11 14:46:00 2013 -0800
+++ b/pkg/manifests/x11-library-mesa.p5m Sat Mar 14 12:06:11 2015 -0700
@@ -1,4 +1,4 @@
-# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -24,11 +24,10 @@
value="Mesa - open-source implementation of the OpenGL specification"
set name=pkg.description \
value="The Mesa 3-D graphics library is an open-source implementation of the OpenGL specification - a system for rendering interactive 3D graphics."
+$(i386_ONLY)file path=etc/drirc mode=0644 overlay=allow preserve=renamenew
link path=usr/X11/include/mesa target=../../include/mesa
link path=usr/X11/lib/$(ARCH64)/libGLU.so target=libGLU.so.1
-link path=usr/X11/lib/$(ARCH64)/libGLU.so.1 target=libGLU.so.1.3.1
-link path=usr/X11/lib/$(ARCH64)/libGLU.so.1.3.1 \
- target=../GL/$(ARCH64)/libGLU.so.1.3.1
+link path=usr/X11/lib/$(ARCH64)/libGLU.so.1 target=../GL/$(ARCH64)/libGLU.so.1
link path=usr/X11/lib/$(ARCH64)/libdricore9.0.3.so target=libdricore9.0.3.so.1
link path=usr/X11/lib/$(ARCH64)/libdricore9.0.3.so.1 \
target=libdricore9.0.3.so.1.0.0
@@ -39,8 +38,7 @@
link path=usr/X11/lib/$(ARCH64)/libglapi.so.0.0.0 \
target=../GL/$(ARCH64)/libglapi.so.0.0.0
link path=usr/X11/lib/libGLU.so target=libGLU.so.1
-link path=usr/X11/lib/libGLU.so.1 target=libGLU.so.1.3.1
-link path=usr/X11/lib/libGLU.so.1.3.1 target=GL/libGLU.so.1.3.1
+link path=usr/X11/lib/libGLU.so.1 target=GL/libGLU.so.1
link path=usr/X11/lib/libdricore9.0.3.so target=libdricore9.0.3.so.1
link path=usr/X11/lib/libdricore9.0.3.so.1 target=libdricore9.0.3.so.1.0.0
link path=usr/X11/lib/libdricore9.0.3.so.1.0.0 \
@@ -73,9 +71,7 @@
link path=usr/lib/$(ARCH64)/libGL.so target=libGL.so.1
link path=usr/lib/$(ARCH64)/libGL.so.1 target=../GL/$(ARCH64)/libGL.so.1
link path=usr/lib/$(ARCH64)/libGLU.so target=libGLU.so.1
-link path=usr/lib/$(ARCH64)/libGLU.so.1 target=libGLU.so.1.3.1
-link path=usr/lib/$(ARCH64)/libGLU.so.1.3.1 \
- target=../GL/$(ARCH64)/libGLU.so.1.3.1
+link path=usr/lib/$(ARCH64)/libGLU.so.1 target=../GL/$(ARCH64)/libGLU.so.1
link path=usr/lib/$(ARCH64)/libdricore9.0.3.so target=libdricore9.0.3.so.1
link path=usr/lib/$(ARCH64)/libdricore9.0.3.so.1 target=libdricore9.0.3.so.1.0.0
link path=usr/lib/$(ARCH64)/libdricore9.0.3.so.1.0.0 \
@@ -90,9 +86,8 @@
dir path=usr/lib/GL
dir path=usr/lib/GL/$(ARCH64)
link path=usr/lib/GL/$(ARCH64)/libGLU.so target=libGLU.so.1
-link path=usr/lib/GL/$(ARCH64)/libGLU.so.1 target=libGLU.so.1.3.1
-link path=usr/lib/GL/$(ARCH64)/libGLU.so.1.3.1 \
- target=../../mesa/$(ARCH64)/libGLU.so.1.3.1
+link path=usr/lib/GL/$(ARCH64)/libGLU.so.1 \
+ target=../../mesa/$(ARCH64)/libGLU.so.1
link path=usr/lib/GL/$(ARCH64)/libdricore9.0.3.so target=libdricore9.0.3.so.1
link path=usr/lib/GL/$(ARCH64)/libdricore9.0.3.so.1 \
target=libdricore9.0.3.so.1.0.0
@@ -103,8 +98,7 @@
link path=usr/lib/GL/$(ARCH64)/libglapi.so.0.0.0 \
target=../../mesa/$(ARCH64)/libglapi.so.0.0.0
link path=usr/lib/GL/libGLU.so target=libGLU.so.1
-link path=usr/lib/GL/libGLU.so.1 target=libGLU.so.1.3.1
-link path=usr/lib/GL/libGLU.so.1.3.1 target=../mesa/libGLU.so.1.3.1
+link path=usr/lib/GL/libGLU.so.1 target=../mesa/libGLU.so.1
link path=usr/lib/GL/libdricore9.0.3.so target=libdricore9.0.3.so.1
link path=usr/lib/GL/libdricore9.0.3.so.1 target=libdricore9.0.3.so.1.0.0
link path=usr/lib/GL/libdricore9.0.3.so.1.0.0 \
@@ -115,8 +109,7 @@
link path=usr/lib/libGL.so target=libGL.so.1
link path=usr/lib/libGL.so.1 target=GL/libGL.so.1
link path=usr/lib/libGLU.so target=libGLU.so.1
-link path=usr/lib/libGLU.so.1 target=libGLU.so.1.3.1
-link path=usr/lib/libGLU.so.1.3.1 target=GL/libGLU.so.1.3.1
+link path=usr/lib/libGLU.so.1 target=GL/libGLU.so.1
link path=usr/lib/libdricore9.0.3.so target=libdricore9.0.3.so.1
link path=usr/lib/libdricore9.0.3.so.1 target=libdricore9.0.3.so.1.0.0
link path=usr/lib/libdricore9.0.3.so.1.0.0 target=GL/libdricore9.0.3.so.1.0.0
@@ -129,8 +122,7 @@
link path=usr/lib/mesa/$(ARCH64)/libGL.so.1 target=libGL.so.1.2.0
file path=usr/lib/mesa/$(ARCH64)/libGL.so.1.2.0
link path=usr/lib/mesa/$(ARCH64)/libGLU.so target=libGLU.so.1
-link path=usr/lib/mesa/$(ARCH64)/libGLU.so.1 target=libGLU.so.1.3.1
-file path=usr/lib/mesa/$(ARCH64)/libGLU.so.1.3.1
+file path=usr/lib/mesa/$(ARCH64)/libGLU.so.1
link path=usr/lib/mesa/$(ARCH64)/libdricore9.0.3.so target=libdricore9.0.3.so.1
link path=usr/lib/mesa/$(ARCH64)/libdricore9.0.3.so.1 \
target=libdricore9.0.3.so.1.0.0
@@ -143,8 +135,7 @@
link path=usr/lib/mesa/libGL.so.1 target=libGL.so.1.2.0
file path=usr/lib/mesa/libGL.so.1.2.0
link path=usr/lib/mesa/libGLU.so target=libGLU.so.1
-link path=usr/lib/mesa/libGLU.so.1 target=libGLU.so.1.3.1
-file path=usr/lib/mesa/libGLU.so.1.3.1
+file path=usr/lib/mesa/libGLU.so.1
link path=usr/lib/mesa/libdricore9.0.3.so target=libdricore9.0.3.so.1
link path=usr/lib/mesa/libdricore9.0.3.so.1 target=libdricore9.0.3.so.1.0.0
file path=usr/lib/mesa/libdricore9.0.3.so.1.0.0