CC=gcc
-export CC SBCL
+
+# Need to set CFLAGS and LDFLAGS here. sb-posix, sb-grovel, and
+# sb-bsd-sockets depends upon these being set on x86_64. Setting these
+# in their Makefile's is not adequate since their asd files are
+# invoked when loaded from other modules which don't require these
+# environmental values in their Makefile's.
+
+UNAME:=$(shell uname -m)
+export CFLAGS=-fPIC
+ifeq (solaris,$(UNAME))
+ export LDFLAGS=-shared -lresolv -lsocket -lnsl
+else
+ ifeq (Darwin,$(UNAME))
+ export LDFLAGS=-bundle
+ else
+ ifeq (x86_64,$(UNAME))
+ export LDFLAGS=-m32 -shared
+ export CFLAGS+= -m32
+ else
+ export LDFLAGS=-shared
+ endif
+ endif
+endif
+
+export CC SBCL CFLAGS LDFLAGS
all: $(EXTRA_ALL_TARGETS)
$(MAKE) -C ../asdf
-# Set CFLAGS and LDFLAGS for sb-bsd-sockets.asd's invocation of gcc
-
-UNAME:=$(shell uname -m)
-
-export CFLAGS=-fPIC
-ifeq (solaris,$(UNAME))
- export LDFLAGS=-shared -lresolv -lsocket -lnsl
-else
- ifeq (Darwin,$(UNAME))
- export LDFLAGS=-bundle
- else
- ifeq (x86_64,$(UNAME))
- export LDFLAGS=-m32 -shared
- export CFLAGS+= -m32
- else
- export LDFLAGS=-shared
- endif
- endif
-endif
-
SYSTEM=sb-bsd-sockets
include ../asdf-module.mk
(funcall (intern "C-CONSTANTS-EXTRACT" (find-package "SB-GROVEL"))
filename tmp-c-source (constants-package component))
(and
- (= (run-shell-command "gcc -o ~S ~S" (namestring tmp-a-dot-out)
- (namestring tmp-c-source)) 0)
+ (= (run-shell-command "gcc ~A -o ~S ~S"
+ (if (sb-ext:posix-getenv "CFLAGS")
+ (sb-ext:posix-getenv "CFLAGS")
+ "")
+ (namestring tmp-a-dot-out)
+ (namestring tmp-c-source)) 0)
(= (run-shell-command "~A >~A"
(namestring tmp-a-dot-out)
(namestring tmp-constants)) 0)
SYSTEM=sb-posix
include ../asdf-module.mk
+
# similar with :STACK-GROWS-FOOWARD, too. -- WHN 2002-03-03
if [ "$sbcl_arch" = "x86" ] ; then
printf ' :gencgc :stack-grows-downward-not-upward :c-stack-is-control-stack' >> $ltf
+ cd tools-for-build
+ $GNUMAKE -I ../src/runtime modify-ldt-struct-name
+ ./modify-ldt-struct-name > ../src/runtime/modify-ldt-struct-name.h
+ cd ..
elif [ "$sbcl_arch" = "mips" ] ; then
# Use a little C program to try to guess the endianness. Ware
# cross-compilers!
#include <sys/stat.h>
#include <unistd.h>
#include <asm/ldt.h>
+#include "modify-ldt-struct-name.h"
#include <linux/unistd.h>
#include <sys/mman.h>
#include "thread.h" /* dynamic_values_bytes */
+#ifndef MODIFY_LDT_STRUCT_NAMED_USER_DESC
+/* old glibc */
+#define user_desc modify_ldt_ldt_s
+#endif
+
_syscall3(int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount );
#include "validate.h"
/* this must be called from a function that has an exclusive lock
* on all_threads
*/
- struct modify_ldt_ldt_s ldt_entry = {
+ struct user_desc ldt_entry = {
1, 0, 0, /* index, address, length filled in later */
1, MODIFY_LDT_CONTENTS_DATA, 0, 0, 0, 1
};
*/
int arch_os_thread_cleanup(struct thread *thread) {
- struct modify_ldt_ldt_s ldt_entry = {
+ struct user_desc ldt_entry = {
0, 0, 0,
0, MODIFY_LDT_CONTENTS_DATA, 0, 0, 0, 0
};
CPPFLAGS=-I../src/runtime
-all: grovel-headers determine-endianness where-is-mcontext
+all: grovel-headers determine-endianness where-is-mcontext modify-ldt-struct-name
clean:
- rm -f *.o grovel-headers determine-endianness where-is-mcontext
+ rm -f *.o grovel-headers determine-endianness where-is-mcontext modify-ldt-structure-name
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.5.47"
+"0.8.5.48"