Compare commits

...

5 Commits

Author SHA1 Message Date
Lauri Kasanen 52bd66b65c Fix build on automake 1.10.1 2021-01-23 09:15:46 +02:00
clbr d5c02ad5bb
Merge pull request #3 from stenstorp/master
Fix building on musl and with gcc 10
2021-01-23 07:01:03 +00:00
Thomas Batten 0644c074e4 mark functions that LTO breaks on musl 2021-01-23 08:24:32 +10:30
Thomas Batten 85e8af0e0d fix build on musl, require automake 2.60 2021-01-23 08:23:28 +10:30
Thomas Batten fad566e010 Makefile.am: fix autogen warning about subdir objects 2021-01-22 20:42:49 +10:30
10 changed files with 31 additions and 23 deletions

1
.gitignore vendored
View File

@ -3,6 +3,7 @@ Makefile.in
.deps .deps
.libs .libs
.msg .msg
.dirstamp
*.lo *.lo
*.la *.la
*.a *.a

View File

@ -1,3 +1,5 @@
AUTOMAKE_OPTIONS = subdir-objects
ACLOCAL_AMFLAGS=-I m4 ACLOCAL_AMFLAGS=-I m4
if DBE if DBE

View File

@ -39,13 +39,15 @@
#endif #endif
#include <sys/types.h> #include <sys/types.h>
#if defined(linux) && (!defined(__GNU_LIBRARY__) || __GNU_LIBRARY__ < 2)
/* libc4 does not define __GNU_LIBRARY__, libc5 defines __GNU_LIBRARY__ as 1 */ #ifdef __linux__
/* Linux libc4 and libc5 only (because glibc doesn't include kernel headers): # ifdef __GNU_LIBRARY__
Linux 2.0.x and 2.2.x define SHMLBA as PAGE_SIZE, but forget to define # if __GNU_LIBRARY__ < 2 /* libc5 */
PAGE_SIZE. It is defined in <asm/page.h>. */ # include <asm/page.h>
#include <asm/page.h> # endif
# endif
#endif #endif
#include <sys/ipc.h> #include <sys/ipc.h>
#include <sys/shm.h> #include <sys/shm.h>
#include <sys/stat.h> #include <sys/stat.h>

View File

@ -23,8 +23,10 @@ dnl Process this file with autoconf to create configure.
AC_PREREQ(2.57) AC_PREREQ(2.57)
AC_INIT([tinyx], 1.3) AC_INIT([tinyx], 1.3)
AC_PREREQ([2.60])
AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])
AC_USE_SYSTEM_EXTENSIONS
AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip foreign -Wall]) AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip foreign -Wall])
dnl this gets generated by autoheader, and thus contains all the defines. we dnl this gets generated by autoheader, and thus contains all the defines. we
@ -37,7 +39,8 @@ dnl kdrive-config.h covers the kdrive DDX
AC_CONFIG_HEADERS(include/kdrive-config.h) AC_CONFIG_HEADERS(include/kdrive-config.h)
AC_PROG_CC AC_PROG_CC
AM_PROG_AR AM_PROG_CC_C_O
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
AM_PROG_AS AM_PROG_AS
AC_PROG_INSTALL AC_PROG_INSTALL
AC_PROG_LN_S AC_PROG_LN_S
@ -574,14 +577,6 @@ AM_CONDITIONAL(KDRIVEFBDEV, [test x"$ac_cv_header_linux_fb_h" = xyes])
dnl and the rest of these are generic, so they're in config.h dnl and the rest of these are generic, so they're in config.h
AC_DEFINE(XResExtension, 1, [Build XRes extension]) AC_DEFINE(XResExtension, 1, [Build XRes extension])
AC_TRY_COMPILE([
#include <features.h>
#ifndef __GLIBC__
#error not glibc
#endif
], [], [AC_DEFINE(_GNU_SOURCE, 1,
[ Enable GNU and other extensions to the C environment for glibc])])
dnl ---------- Compiler arguments dnl ---------- Compiler arguments
AX_CHECK_COMPILE_FLAG([-flto], AX_CHECK_COMPILE_FLAG([-flto],

View File

@ -328,6 +328,6 @@ void ProcessInputEvents(void);
void InitInput( void InitInput(
int /*argc*/, int /*argc*/,
char ** /*argv*/); char ** /*argv*/) XFONT_LTO;
#endif /* INPUT_H */ #endif /* INPUT_H */

View File

@ -231,7 +231,7 @@ void OsCleanup(Bool);
void OsVendorFatalError(void); void OsVendorFatalError(void);
void OsVendorInit(void); void OsVendorInit(void) XFONT_LTO;
void OsBlockSignals (void); void OsBlockSignals (void);
@ -320,9 +320,9 @@ XID GenerateAuthorization(
char ** /* data_return */); char ** /* data_return */);
int ddxProcessArgument(int /*argc*/, char * /*argv*/ [], int /*i*/); XFONT_LTO int ddxProcessArgument(int /*argc*/, char * /*argv*/ [], int /*i*/);
void ddxUseMsg(void); void ddxUseMsg(void) XFONT_LTO;
/* int ReqLen(xReq *req, ClientPtr client) /* int ReqLen(xReq *req, ClientPtr client)
* Given a pointer to a *complete* request, return its length in bytes. * Given a pointer to a *complete* request, return its length in bytes.

View File

@ -527,6 +527,6 @@ extern ScreenInfo screenInfo;
void InitOutput( void InitOutput(
ScreenInfo * /*pScreenInfo*/, ScreenInfo * /*pScreenInfo*/,
int /*argc*/, int /*argc*/,
char ** /*argv*/); char ** /*argv*/) XFONT_LTO;
#endif /* SCREENINTSTRUCT_H */ #endif /* SCREENINTSTRUCT_H */

View File

@ -34,6 +34,12 @@
#include <X11/keysym.h> #include <X11/keysym.h>
#include <linux/apm_bios.h> #include <linux/apm_bios.h>
/* These symbols are not defined on musl */
#if !defined(__uid_t) && !defined(__gid_t)
#define __uid_t uid_t
#define __gid_t gid_t
#endif
static int vtno; static int vtno;
int LinuxConsoleFd; int LinuxConsoleFd;
static int LinuxApmFd; static int LinuxApmFd;

View File

@ -1,3 +1,5 @@
AUTOMAKE_OPTIONS = subdir-objects
AM_CPPFLAGS = \ AM_CPPFLAGS = \
@KDRIVE_INCS@ \ @KDRIVE_INCS@ \
@KDRIVE_CFLAGS@ @KDRIVE_CFLAGS@
@ -16,7 +18,7 @@ libkdrive_a_SOURCES = \
kmap.c \ kmap.c \
kmode.c \ kmode.c \
kshadow.c \ kshadow.c \
$(top_srcdir)/mi/miinitext.c ../../mi/miinitext.c
libkdrivestubs_a_SOURCES = \ libkdrivestubs_a_SOURCES = \
$(top_srcdir)/fb/fbcmap.c ../../fb/fbcmap.c

View File

@ -414,6 +414,6 @@ KdShadowSet(ScreenPtr pScreen, int randr, ShadowUpdateProc update,
void KdShadowUnset(ScreenPtr pScreen); void KdShadowUnset(ScreenPtr pScreen);
/* function prototypes to be implemented by the drivers */ /* function prototypes to be implemented by the drivers */
void InitCard(char *name); void InitCard(char *name) XFONT_LTO;
#endif /* _KDRIVE_H_ */ #endif /* _KDRIVE_H_ */