diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2017-04-13 12:00:26 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2017-05-04 23:51:21 +0200 |
commit | d8a25946ef06217c10d6a5c7caf693f6bfd24c8b (patch) | |
tree | c9583a9d28fe5019fd26d0be8e0fe3f5bfd6590b /nx-X11/config/cf | |
parent | c59710e8eb2d641b0f14d99a4ed14399a0cc7ac5 (diff) | |
download | nx-libs-d8a25946ef06217c10d6a5c7caf693f6bfd24c8b.tar.gz nx-libs-d8a25946ef06217c10d6a5c7caf693f6bfd24c8b.tar.bz2 nx-libs-d8a25946ef06217c10d6a5c7caf693f6bfd24c8b.zip |
nx-X11/config/cf/gnu*: Re-introduce GNU/Hurd support to the nx-X11 buildflow.
Diffstat (limited to 'nx-X11/config/cf')
-rw-r--r-- | nx-X11/config/cf/gnu.cf | 183 | ||||
-rw-r--r-- | nx-X11/config/cf/gnuLib.rules | 172 | ||||
-rw-r--r-- | nx-X11/config/cf/gnuLib.tmpl | 6 |
3 files changed, 361 insertions, 0 deletions
diff --git a/nx-X11/config/cf/gnu.cf b/nx-X11/config/cf/gnu.cf new file mode 100644 index 000000000..c7dd071fe --- /dev/null +++ b/nx-X11/config/cf/gnu.cf @@ -0,0 +1,183 @@ +#ifndef OSName +#define OSName DefaultOSName +#endif + +#ifndef OSVendor +#define OSVendor /**/ +#endif +#ifndef OSMajorVersion +#define OSMajorVersion DefaultOSMajorVersion +#endif +#ifndef OSMinorVersion +#define OSMinorVersion DefaultOSMinorVersion +#endif +#ifndef OSTeenyVersion +#define OSTeenyVersion DefaultOSTeenyVersion +#endif +XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion) + +#define GNUSourceDefines -D_POSIX_C_SOURCE=199309L \ + -D_POSIX_SOURCE -D_XOPEN_SOURCE \ + -D_DEFAULT_SOURCE + +XCOMM XXXMB: What about _GNU_SOURCE, see Linux/UseInstalled? + +#define XawI18nDefines -DHAS_WCHAR_H -DHAS_WCTYPE_H -DNO_WIDEC_H + +#define HasPosixThreads YES +#define ThreadedX YES +#define HasThreadSafeAPI YES +#define ThreadsLibraries -lpthread +#define SystemMTDefines -D_REENTRANT + +#ifndef HasLibCrypt +#define HasLibCrypt YES +#endif + +#ifndef BuildXF86RushExt +# define BuildXF86RushExt YES +#endif + +#define BuildLibPathVar LD_LIBRARY_PATH +#define GccUsesGas YES +#define UseGas YES +#define GnuCpp YES +#define HasDlopen YES +#ifndef HasShadowPasswd +# define HasShadowPasswd YES +#endif +#define HasPutenv YES + +XCOMM Not implemented and will always fail. +#ifndef HasShm +# define HasShm YES +#endif + +#define HasBSD44Sockets YES +#define HasSockets YES +#define HasSnprintf YES +#define HasMkstemp YES +#define HasUsableFileMmap YES +#ifndef HasNCurses +#define HasNCurses YES +#endif + +#define AvoidNullMakeCommand YES +#ifndef DebuggableLibraries +#define DebuggableLibraries NO +#endif +#define CompressAllFonts YES +#define Malloc0ReturnsNull YES +#define NeedConstPrototypes YES +#define NeedFunctionPrototypes YES +#define NeedNestedPrototypes YES +#define NeedVarargsPrototypes YES +#ifndef NeedWidePrototypes +#define NeedWidePrototypes NO +#endif +#define SetTtyGroup YES + +#ifndef UseStaticTermcapLib +#define UseStaticTermcapLib NO +#endif + +#define MkdirHierCmd mkdir -p +#ifndef CcCmd +#define CcCmd gcc +#endif +#ifndef AsCmd +#define AsCmd as +#endif +#ifndef LdCmd +#define LdCmd ld +#endif + +#define AsmDefines -D__ELF__ +#define CplusplusCmd c++ +#ifndef TermcapLibrary +#if UseStaticTermcapLib +#define TermcapLibrary StaticLibrary(/usr/lib,ncurses) +#else +#define TermcapLibrary -lncurses +#endif +#endif +#ifndef DoLoadableServer +#define DoLoadableServer YES +#endif +#ifndef CppCmd +#define CppCmd /lib/cpp +#endif +#define YaccCmd bison -y +#define LexCmd flex -l +#define HasFlex YES +#define LexLib -lfl +#define PreProcessCmd CcCmd -E +#define PostIncDir DefaultGccIncludeDir +#define LdCombineFlags -r +#ifndef LdPostLib +#define LdPostLib /* Never needed */ +#endif +#define HasWChar32 YES +#define StandardCppOptions -traditional +#define StandardCppDefines StandardDefines + +#define HasVarRun YES +#define VarDbDirectory $(VARDIR)/lib + +XCOMM i386Architecture +#define OptimizedCDebugFlags DefaultGcc2i386Opt +#define GNUMachineDefines -D__i386__ +#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines +#define HasPlugin YES +#define VendorHasX11R6_3libXext YES + +#ifndef StandardDefines +#define StandardDefines GNUMachineDefines GNUSourceDefines +#endif + +#define DlLibrary -rdynamic -ldl + +#define ServerExtraSysLibs /**/ + +#define ConnectionFlags -DUNIXCONN -DTCPCONN + +/* Some of these man page defaults are overriden in the above OS sections */ +#ifndef ManSuffix +# define ManSuffix 1x +#endif +#ifndef ManDir +# define ManDir $(MANSOURCEPATH)1 +#endif +#ifndef LibManSuffix +# define LibManSuffix 3x +#endif +#ifndef LibmanDir +# define LibmanDir $(MANSOURCEPATH)3 +#endif +#ifndef FileManSuffix +# define FileManSuffix 5x +#endif +#ifndef FileManDir +# define FileManDir $(MANSOURCEPATH)5 +#endif + +#ifndef StaticLibrary +#define StaticLibrary(libpath,libname) -Wl,-Bstatic Concat(-L,libpath) Concat(-l,libname) -Wl,-Bdynamic +#endif + +#define HasGnuMake YES + +#define MakeNamedTargetSubdir(dir,flags,subname)\ + $(MAKE) -C dir $(MFLAGS) $(PARALLELMFLAGS) flags subname + +#define ArchitectureDefines -DGNU_ARCHITECTURE + +#define XserverNeedsSetUID NO + +#include <gnuLib.rules> + +XCOMM XXX Might need this if they are not careful with slashes. +XCOMM #define DirFailPrefix - + +#include <xorg.cf> diff --git a/nx-X11/config/cf/gnuLib.rules b/nx-X11/config/cf/gnuLib.rules new file mode 100644 index 000000000..0282bfb0f --- /dev/null +++ b/nx-X11/config/cf/gnuLib.rules @@ -0,0 +1,172 @@ +/* + * GNU/Hurd shared library rules + * + * $XFree86: xc/config/cf/gnuLib.rules,v 1.9 2003/10/11 09:40:13 herrb Exp $ + */ + +/* + * GNU/Hurd shared library rules + * Cloned from Linux (ELF) shared library rules + * + */ + +#ifndef HasSharedLibraries +#define HasSharedLibraries YES +#endif +#ifndef ForceNormalLib +#define ForceNormalLib NO +#endif + +XCOMM XXX To rpath or not to rpath... +#ifndef UseRpath +#define UseRpath YES +#endif + +#undef SpecialMalloc +#define SpecialMalloc NO + +#define BaseShLibReqs -lc + +#ifndef SharedDataSeparation +#define SharedDataSeparation NO +#endif +#ifndef SharedCodeDef +#define SharedCodeDef /**/ +#endif +#ifndef SharedLibraryDef +#define SharedLibraryDef /**/ +#endif +#ifndef ShLibIncludeFile +#define ShLibIncludeFile <gnuLib.tmpl> +#endif +#ifndef RpathLoadFlags +#if UseRpath +#define RpathLoadFlags -Wl,-rpath=$(USRLIBDIRPATH) +#else +#define RpathLoadFlags /**/ +#endif +#endif +#ifndef LibraryRpathLoadFlags +#define LibraryRpathLoadFlags RpathLoadFlags +#endif +#ifndef SharedLibraryLoadFlags +#define SharedLibraryLoadFlags -shared LibraryRpathLoadFlags +#endif +#ifndef PositionIndependentCFlags +#define PositionIndependentCFlags -fPIC +#endif +#ifndef PositionIndependentCplusplusFlags +#define PositionIndependentCplusplusFlags -fPIC +#endif +#ifndef ExtraLoadFlags +#ifdef UseInstalled +XCOMM XXX Maybe superfluous. +#define ExtraLoadFlags RpathLoadFlags -Wl,-rpath-link=$(USRLIBDIRPATH) +#else +#define ExtraLoadFlags RpathLoadFlags -Wl,-rpath-link=$(BUILDLIBDIR) +#endif +#endif + +/* + * InstallSharedLibrary - generate rules to install the shared library. + * NOTE: file must be executable, hence "INSTBINFLAGS" + */ +#ifndef InstallSharedLibrary +#define InstallSharedLibrary(libname,rev,dest) @@\ +install:: Concat(lib,libname.so.rev) @@\ + MakeDir($(DESTDIR)dest) @@\ + $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\ + @T=`echo Concat($(DESTDIR)dest/lib,libname.so.rev) | sed 's/\(lib[^\.]*\.so\.[0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`;\ + set -x; $(RM) $$T && $(LN) Concat(lib,libname.so.rev) $$T @@\ + @if $(SOSYMLINK); then (set -x; \ + $(RM) Concat($(DESTDIR)dest/lib,libname.so); \ @@\ + $(LN) Concat(lib,libname.so.rev) Concat($(DESTDIR)dest/lib,libname.so)); fi +#endif /* InstallSharedLibrary */ + +/* + * InstallSharedLibraryData - generate rules to install the shared library data + */ +#ifndef InstallSharedLibraryData +#define InstallSharedLibraryData(libname,rev,dest) +#endif /* InstallSharedLibraryData */ + + +/* + * SharedLibraryTarget - generate rules to create a shared library; + * build it into a different name so that we do not hose people by having + * the library gone for long periods. + */ +#ifndef SharedLibraryTarget +#define SharedLibraryTarget(libname,rev,solist,down,up) @@\ +AllTarget(Concat(lib,libname.so.rev)) @@\ + @@\ +Concat(lib,libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\ + $(RM) $@~ @@\ + @SONAME=`echo $@ | sed 's/\(lib[^\.]*\.so\.[0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; set -x; \ @@\ + (cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\ + $(RM) $$SONAME; $(LN) $@ $$SONAME; \ @@\ + LinkBuildSonameLibrary($$SONAME) @@\ + $(RM) $@ @@\ + $(MV) $@~ $@ @@\ + @if $(SOSYMLINK); then (set -x; \ @@\ + $(RM) Concat(lib,libname.so); \ @@\ + $(LN) $@ Concat(lib,libname.so)); fi @@\ + LinkBuildLibrary($@) @@\ + LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\ + @@\ +clean:: @@\ + @MAJREV=`echo rev | sed 's/\([0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; \ @@\ + set -x; $(RM) Concat(lib,libname.so.$$MAJREV) @@\ + $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) + +#endif /* SharedLibraryTarget */ + +/* + * SharedDepLibraryTarget - generate rules to create a shared library. + */ +#ifndef SharedDepLibraryTarget +#define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\ +AllTarget(Concat(lib,libname.so.rev)) @@\ + @@\ +Concat(lib,libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\ + $(RM) $@~ @@\ + @SONAME=`echo $@ | sed 's/\(lib[^\.]*\.so\.[0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; set -x; \ @@\ + (cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\ + $(RM) $$SONAME; $(LN) $@ $$SONAME; \ @@\ + LinkBuildSonameLibrary($$SONAME) @@\ + $(RM) $@ @@\ + $(MV) $@~ $@ @@\ + @if $(SOSYMLINK); then (set -x; \ @@\ + $(RM) Concat(lib,libname.so); \ @@\ + $(LN) $@ Concat(lib,libname.so)); fi @@\ + LinkBuildLibrary($@) @@\ + LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\ + @@\ +clean:: @@\ + @MAJREV=`echo rev | sed 's/\([0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; \ @@\ + set -x; $(RM) Concat(lib,libname.so.$$MAJREV) @@\ + $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) + +#endif /* SharedDepLibraryTarget */ + +#ifndef SharedDepModuleTarget +#define SharedDepModuleTarget(name,deps,solist) @@\ +AllTarget(name) @@\ + @@\ +name: deps @@\ + $(RM) $@~ @@\ + $(CC) -o $@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS) BaseShLibReqs @@\ + $(RM) $@ @@\ + $(MV) $@~ $@ @@\ + @@\ +clean:: @@\ + $(RM) name + +#endif /* SharedDepModuleTarget */ + +/* + * SharedLibraryDataTarget - generate rules to create shlib data file; + */ +#ifndef SharedLibraryDataTarget +#define SharedLibraryDataTarget(libname,rev,salist) +#endif /* SharedLibraryTarget */ diff --git a/nx-X11/config/cf/gnuLib.tmpl b/nx-X11/config/cf/gnuLib.tmpl new file mode 100644 index 000000000..97917ba5a --- /dev/null +++ b/nx-X11/config/cf/gnuLib.tmpl @@ -0,0 +1,6 @@ +XCOMM +XCOMM GNU Hurd shared library template +XCOMM + +#define SharedX11Reqs +#define SharedXlibi18nReqs $(LDPRELIB) $(XONLYLIB) |