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
.libs
.msg
.dirstamp
*.lo
*.la
*.a

View File

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

View File

@ -39,13 +39,15 @@
#endif
#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 */
/* Linux libc4 and libc5 only (because glibc doesn't include kernel headers):
Linux 2.0.x and 2.2.x define SHMLBA as PAGE_SIZE, but forget to define
PAGE_SIZE. It is defined in <asm/page.h>. */
#include <asm/page.h>
#ifdef __linux__
# ifdef __GNU_LIBRARY__
# if __GNU_LIBRARY__ < 2 /* libc5 */
# include <asm/page.h>
# endif
# endif
#endif
#include <sys/ipc.h>
#include <sys/shm.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_INIT([tinyx], 1.3)
AC_PREREQ([2.60])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_MACRO_DIR([m4])
AC_USE_SYSTEM_EXTENSIONS
AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip foreign -Wall])
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_PROG_CC
AM_PROG_AR
AM_PROG_CC_C_O
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
AM_PROG_AS
AC_PROG_INSTALL
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
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
AX_CHECK_COMPILE_FLAG([-flto],

View File

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

View File

@ -231,7 +231,7 @@ void OsCleanup(Bool);
void OsVendorFatalError(void);
void OsVendorInit(void);
void OsVendorInit(void) XFONT_LTO;
void OsBlockSignals (void);
@ -320,9 +320,9 @@ XID GenerateAuthorization(
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)
* Given a pointer to a *complete* request, return its length in bytes.

View File

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

View File

@ -34,6 +34,12 @@
#include <X11/keysym.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;
int LinuxConsoleFd;
static int LinuxApmFd;

View File

@ -1,3 +1,5 @@
AUTOMAKE_OPTIONS = subdir-objects
AM_CPPFLAGS = \
@KDRIVE_INCS@ \
@KDRIVE_CFLAGS@
@ -16,7 +18,7 @@ libkdrive_a_SOURCES = \
kmap.c \
kmode.c \
kshadow.c \
$(top_srcdir)/mi/miinitext.c
../../mi/miinitext.c
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);
/* function prototypes to be implemented by the drivers */
void InitCard(char *name);
void InitCard(char *name) XFONT_LTO;
#endif /* _KDRIVE_H_ */