Commit graph

58 commits

Author SHA1 Message Date
Stas Boukarev 302a48afba Use CFLAGS instead of EXTRA_CFLAGS for sb-grovel
CFLAGS can be modified to allow cross-compilation, and building the
runtime already respects CFLAGS.
2026-03-09 14:34:18 +03:00
Stas Boukarev b5727577cb Adjust sb-grovel windows-arm64 2026-02-14 04:20:38 +03:00
Douglas Katzman f32023a851 Terminate error messages with newline 2026-02-01 09:45:09 -05:00
Stas Boukarev f119986c69 Fix sb-posix for 64-bit time_t. 2025-01-17 05:34:24 +03:00
Douglas Katzman 9082ffd551 Prevent sb-grovel symbols from sticking around
Some checks failed
CL-host / ecl (push) Waiting to run
CL-host / clisp (push) Waiting to run
CL-host / ccl (push) Waiting to run
CL-host / cmucl (push) Waiting to run
CL-host / sbcl (push) Waiting to run
CL-host / compare-xc-host-fasls (ccl, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (clisp, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (cmucl, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (self, false) (push) Blocked by required conditions
Linux / build (x86, --with-sb-thread, ) (push) Waiting to run
Linux / build (x86, --without-sb-thread, ) (push) Waiting to run
Linux / build (x86, --without-sb-unicode, ) (push) Waiting to run
Linux / build (x86-64, --with-mark-region-gc) (push) Waiting to run
Linux / build (x86-64, --with-sb-fasteval --without-sb-eval, fasteval) (push) Waiting to run
Linux / build (x86-64, --with-sb-thread, ) (push) Waiting to run
Linux / build (x86-64, --with-sb-thread, sse4) (push) Waiting to run
Linux / build (x86-64, --without-sb-thread, ) (push) Waiting to run
Linux / build (x86-64, --without-sb-unicode, ) (push) Waiting to run
Mac / build (--without-sb-thread, x86-64) (push) Waiting to run
Mac / build (arm64, --with-mark-region-gc) (push) Waiting to run
Mac / build (arm64, --with-sb-thread) (push) Waiting to run
Mac / build (x86-64, --with-mark-region-gc) (push) Waiting to run
Mac / build (x86-64, --with-sb-thread) (push) Waiting to run
Windows / build (push) Waiting to run
Linux qemu / ppc64le (push) Failing after 1s
particularly in lambda lists of generated code.

And remove eval-when from SB-GROVEL::DEFINE-C-STRUCT. It could simply become
part of the macroexpansion of DEFINE-C-STRUCT if needed, but it isn't.
2024-11-15 19:34:24 +00:00
Douglas Katzman 6d0b9ad559 Simplify autogenerated WITH-<c-struct> macro in sb-grovel
It shouldn't use UNWIND-PROTECT or call malloc, but instead just have WITH-ALIEN
utilize the alien stack. Nor should it gensym so much, or use so much EVAL-WHEN.
It's as if sb-grovel's author didn't know how macros or SB-ALIEN work.

In making this change I noticed that the field initializer list is always null
as used within SBCL. And as sb-grovel has no tests, it is impossible to conclude
that this aspect of the macro is even necessary, never mind bug-free.
2024-11-13 23:55:21 +00:00
Douglas Katzman e4964e4199 Remove sb-grovel::define-foreign-routine
Some checks failed
CL-host / ecl (push) Waiting to run
CL-host / clisp (push) Waiting to run
CL-host / ccl (push) Waiting to run
CL-host / cmucl (push) Waiting to run
CL-host / sbcl (push) Waiting to run
CL-host / compare-xc-host-fasls (ccl, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (clisp, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (cmucl, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (self, false) (push) Blocked by required conditions
Linux / build (x86, --with-sb-thread, ) (push) Waiting to run
Linux / build (x86, --without-sb-thread, ) (push) Waiting to run
Linux / build (x86, --without-sb-unicode, ) (push) Waiting to run
Linux / build (x86-64, --with-mark-region-gc) (push) Waiting to run
Linux / build (x86-64, --with-sb-fasteval --without-sb-eval, fasteval) (push) Waiting to run
Linux / build (x86-64, --with-sb-thread, ) (push) Waiting to run
Linux / build (x86-64, --with-sb-thread, sse4) (push) Waiting to run
Linux / build (x86-64, --without-sb-thread, ) (push) Waiting to run
Linux / build (x86-64, --without-sb-unicode, ) (push) Waiting to run
Mac / build (--without-sb-thread, x86-64) (push) Waiting to run
Mac / build (arm64, --with-mark-region-gc) (push) Waiting to run
Mac / build (arm64, --with-sb-thread) (push) Waiting to run
Mac / build (x86-64, --with-mark-region-gc) (push) Waiting to run
Mac / build (x86-64, --with-sb-thread) (push) Waiting to run
Windows / build (push) Waiting to run
Linux qemu / ppc64le (push) Failing after 1s
2024-11-12 19:23:32 +00:00
Sergey Fedorov f2ab0c4dc8 ppc/Darwin: Misc fixes for PPC 2023-08-30 22:37:22 +02:00
Douglas Katzman da10b78524 Factor out C compiler invocation in def-to-lisp
So it can be used without asdf.
Drop support for #+(and x86 darwin) in doing so.
2022-09-29 13:43:58 -04:00
Stas Boukarev 4b8145199a Avoid a C warning in sb-grovel. 2021-02-04 01:27:00 +03:00
Douglas Katzman ea09ef5dfa sb-grovel: Do not emit literally "NIL" as docstring 2020-02-26 08:33:25 -05:00
Stas Boukarev 323891ea59 Change mmacosx-version-min.
The latest Xcode doesn't work with 10.4 or 10.5.
2018-09-24 22:41:22 +03:00
Douglas Katzman 83cfcd9fc5 Make sb-grovel more friendly to other system-building tools
If loaded without :ASDF in *FEATURES*, then you get only the code up to
and including C-CONSTANTS-EXTRACT, no CLOS classes and methods.
If then reloaded with :ASDF in *FEATURES*, a symbol conflict occurs.
This works around it.
2018-04-10 13:47:40 -04:00
Douglas Katzman 02e0dae3c6 Allow sb-grovel to be controlled by driver other than ASDF
- Test for ASDF presence in *features*

- Make groveled constants loadable under the interpreter
2018-01-24 01:41:10 -05:00
Douglas Katzman f197f0366f Fix C warnings from sb-grovel on 32-bit macOS 2017-11-16 23:59:14 -05:00
Stas Boukarev 0747386beb sb-grovel: Pass -m32 on sparc. 2017-10-10 18:45:53 +03:00
Douglas Katzman ac3a86bf18 Make 32-bit Darwin build work with new xcode.
Fails a few sb-posix tests though.
2015-11-06 22:31:03 -05:00
Douglas Katzman 965336031a Temporary hack for newer Xcode until I think of the right thing.
If the shell environment contains SBCL_MACOSX_VERSION_MIN=10.6
then it overrides the autodetection. There are a few issues with
autodetection- that's it's obsolete, that Config is included before
it contains correct values, that we relied on silently-ignore-missing
include feature of Make, and the the default in the absence of a
known darwin9 platform is to assume lower-than-9. Too many problems.
2015-09-18 18:24:28 -04:00
Stas Boukarev eb56770aca Restore sb-grovel backwards compatibility.
In the past sb-grovel treated everything as `int', but now it uses long.
Which caused problems with win64, where things that were expected to
be signed became unsigned.
On x86-64: if a value fits into 4 bytes, cast it to `int', effectively using
(sizeof(x) == 4)? (long) (int) (x): (x)
with obvious differences for long-long on win64.
This restores the previous behaviour while allowing for `long'
constants to be grovelled.
2015-09-07 21:50:35 +03:00
Francois-Rene Rideau 9c82161fd0 sb-grovel: better handling of `long'.
Use %lld instead of %d and cast constants to long long.
2015-09-06 03:35:16 +03:00
Stas Boukarev 34eab1610a Make sb-bsd-socket work on common protocols without getprotobyname.
Android doesn't have a working getprotobyname, but even for other
platforms iterating over a small number of predefined protocols is
much faster, and some default installations do not come bundled with
/etc/protocols.
2014-06-01 08:01:19 +04:00
Stas Boukarev cadf7d0af4 Enable building 32-bit SBCL on 64-bit FreeBSD.
Allow for ./make.sh --arch=x86 to work on x86-64.
2014-04-05 19:05:56 +04:00
Francois-Rene Rideau 25c1769e30 Deliver each contrib as a single FASL. Don't implicitly require ASDF or source code at runtime.
Also, move contrib output to obj/sbcl-home/, asdf cache to obj/asdf-cache/
Update sb-grovel and other contribs and their tests for asdf3.

Fixes lp#1132254.
2013-10-17 03:10:58 +02:00
Nikodemus Siivola d15afa61c4 allow SB-CONTRIB operation without explicitly set CC
Fall back to "cc" with a style-warning.
2012-10-08 08:49:41 +03:00
Nikodemus Siivola ecb0dd2f84 make PPC/Linux buildable on ppc64 hosts 2011-11-27 15:57:00 +02:00
Nikodemus Siivola af0f0f905a make SBCL_ARCH=x86 build work on 64-bit linux without chroot
(Assuming all the compatibility libs, etc, have been installed.)
2011-08-01 17:57:51 +03:00
Cyrus Harmon a3282da5cd 1.0.34.9: darwin/x86-64 sb-posix:stat fixes from Kei Suzuki
* sb-unix:unix-stat/lstat/fstat return the 32bit inode with x86 and
  the 64bit inode with x86-64,

* sb-posix:stat/lstat/fstat get stat values using the old stat calls
  with x86 and the new ones with x86-64

* re-enable now-working sb-posix stat tests
2010-01-21 05:09:43 +00:00
Cyrus Harmon 9e0cc7f6af 1.0.31.2: snow leopard (macos 10.6) build fixes
* on x86/darwin use -arch i386 flags in sb-grovel C compilation

 * comment out failing sb-posix tests

 * add -arch i386 flags to Config.x86-darwin CFLAGS and LINKFLAGS

 * remove #include <ucontext.h> instances
2009-08-31 06:11:12 +00:00
Juho Snellman 53ab0266f9 1.0.26.18: Solaris x86-64 support
* Patch by Alex Viskovatoff
2009-03-22 22:34:58 +00:00
Nikodemus Siivola 646a14a909 1.0.19.16: derive the type of (AREF (THE STRING X) Y) as CHARACTER
* Even though we don't know the exact upgraded array element type, we
   do know the result is a character.

 * Noticed while wondering why C-ESCAPE had a call to %MEMBER instead
   of %MEMBER-EQ.
2008-08-03 19:35:14 +00:00
Richard M Kreuter 3db2b1ac14 1.0.13.2: Removing UNIX-NAMESTRING, part 3 (sort of)
* Add condition classes to SB-POSIX that are subclasses of FILE-ERROR,
  to give more precise information than vanilla FILE-ERRORs after
  users load SB-POSIX.

* Add code to sb-grovel in support of same.
2007-12-30 05:32:29 +00:00
Rudi Schlatte ce20022710 1.0.11.1: Handle set-but-empty environment variables
... SBCL_HOME= sbcl crashed on startup
  ... Patch by Michael Weber
2007-10-26 04:33:34 +00:00
Juho Snellman 1bc83d0179 1.0.6.54: fix building contribs from a clean checkout (oops) 2007-06-18 17:52:16 +00:00
Juho Snellman c3fa52250b 1.0.6.49: make asdf-based contribs more friendly to :FORCE T
* Do the groveling part of sb-grovel only at contrib build time.
          If the contrib is later recompiled, reuse the results from that
          grovel.
        * Doesn't solve the asdf-binary-locations problems related to
          groveling, but it looks as if asdf-binary-locations is already
          automatically adding SBCL_HOME into it's exceptions list.
2007-06-18 16:11:08 +00:00
Cyrus Harmon 9b6bef920d 1.0.4.23: sb-grovel x86-64/darwin fix
* sb-grovel was compiling the C file in 32-bit mode (the default) on
   darwin even when being run from in x86-64 mode. add "-arch"
   "x86_64" to args to CC.
 * remove darwin sepecific version of the stat structure. Turns out
   the original stat struct was really ok but that we were getting
   thrown off by the wrong types coming back from sb-grovel.
2007-04-04 23:52:11 +00:00
Juho Snellman 9848482c76 1.0.1.12:
Provide a better diagnostic for apparently broken
        SB-BSD-SOCKETS installs. Also print a better error message and
        return an error code from make-target-contrib.sh if any
        contribs fail, so that these broken installs are less likely
        to happen.
2007-01-08 03:26:20 +00:00
Juho Snellman 46e428110e 0.9.18.46:
Support files >2GB on Linux/x86.

        * Compile the runtime (and the C type grovelers) with various flags
          to enable a 64-bit off_t.
        * Add C-side wrappers for various POSIX functions, so that we can
          reliably get the largefile versions of them from Lisp-side.
2006-11-12 23:04:57 +00:00
Nikodemus Siivola 25d4ea4f10 0.9.11.35: better package locking and more cleaning up after .31
* package lock violations from lexical operations always cause
    runtime PROGRAM-ERRORs
 * better EXTRA_CFLAGS handling in SB-GROVEL
2006-04-14 08:18:20 +00:00
Nikodemus Siivola 833f66a536 0.9.11.33: fix buglets introduced by .31 on non-Windows
* If we want to delete a file we must have write-permissions...
 * ...elide empty environment-variable from gcc arguments in def-to-lisp.lisp
2006-04-14 06:38:15 +00:00
Nikodemus Siivola 3eb0a28fe6 0.9.11.31: misc win32 improvements
* Check for correct "expand" in canonicalize-whitespace, and skip
     canonicalization if it doesn't seem right. (Windows "expand" is
     something quite different.)
  * RUN-PROGRAM now always returns a process structure, which reports
     the exit-code of the process when :WAIT was true. :WAIT nil
     process-structures still keep their :RUNNING status indefinitely
     on Windows, though.
  * FIND-EXECUTABLE-IN-SEARCH-PATH actually searches the path, and adds
     "exe" as :TYPE if :TYPE is missing on Windows.
  * ASDF:RUN-SHELL-COMMAND searches for Bourne-shell on Windows, as there
     is no default location.
  * SB-GROVEL directly runs gcc and the groveler instead of indirecting 
     via shell, and the groveler directly writes to the lisp-file instead
     of via stdout and shell redirection.
  * Hack SB-POSIX till it builds and passes all applicable tests on Windows. 
     Mostly this involved plenty of #-win32, but a few tests needed to
     be adjusted for the delication Microsoft constitution.
  * Implement COPY-STREAM in ASDF-INSTALL so that it doesn't have to
     depend on SB-EXECUTABLE.
  * Take the .exe suffix into account when installing over an old SBCL
     on MSYS.
  * Adjust UNPARSE-NATIVE-WIN32-NAMESTRING slightly: Windows OS functions
     like stat don't like to have directory names ending with a slash.

This is good enough to run unpatched Slime with *COMMUNICATION-STYLE*
NIL, and build & pass tests with all contribs except SB-SIMPLE-STREAMS.
2006-04-13 22:52:55 +00:00
Rudi Schlatte 33353162b9 0.9.11.6
Merge "patch for sb-grovel" (sbcl-devel 2006-03-29)
    ... conditionalize temporary executable name for windows
2006-03-29 09:13:08 +00:00
William Harold Newman 4898ef32c6 0.9.2.43:
another slice of whitespace canonicalization
	(Anyone who ends up here with "cvs annotate" probably
		wants to look at the "tabby" tagged version.)
2005-07-14 16:30:05 +00:00
Christophe Rhodes 1cae060fd9 0.8.17.27:
Improve ENUM support a little.  (VJA sbcl-devel 2004-12-09)
	... SB-ALIEN enums not limited to symbols any more;
	... SB-GROVEL enum grovelation;
	... tests (which pass despite the current, erm, suboptimality
		of arithmetic :)
2004-12-09 16:15:57 +00:00
Christophe Rhodes 3bdadd34bc 0.8.12.50:
Various fixes from Vincent Arkesteijn
	... just text fixes for now
2004-07-22 07:46:31 +00:00
Andreas Fuchs ecae2f9323 0.8.12.40:
Fix SB-GROVEL to make less catastrophic types

	Thanks to Christophe for most (in fact, all except 2) of these
	fixes.

	* Make sb-grovel's compile failures a bit clearer: There are now
	  separate conditions for c-compile-failed, a-dot-out-failed, and
	  the normal lisp compile/load failures.
	* don't use gensym for structure member names; This confused the
	  environment horribly.
	* make identity-1 a macro so that its uses get optimized away.
	  As a result,
	* sb-bsd-sockets::make-host-ent doesn't throw a compiler optimization
	  note on run time any more.
	* sb-grovel doesn't lie about vector types on array structure fields'
	  SETF accessor any more. As a result, no more type error warnings on
	  constants.lisp-temp compilation any more!
	* sb-bsd-sockets' getprotobyname alien function accepts a
	  (* protoent) structure now.
	* export error-component and error-operation from asdf.lisp
2004-07-19 20:46:47 +00:00
Andreas Fuchs a7c8cdf31f 0.8.11.77:
sb-grovel & sb-posix symbol export changes

	... sb-grovel no longer quietly exports every constant
	... instead, I restored the old default of not exporting the symbol
	    (and, additionally:) unless asked to

	... sb-posix now exports all groveled-for constants and
	    structure/class accessors

	... (implicitly:) sb-bsd-sockets now does no more export its
	    constants. This corresponds to the behavior before 0.8.11.65.
2004-06-01 17:02:22 +00:00
Andreas Fuchs d4c7ab04ed 0.8.10.56:
MORE ALIENS! sb-grovel now defines alien structures.

        Affected:
        ... sb-grovel, obviously. Reworked the def-to-lisp mechanism a bit
            and then hacked foreign-glue.
        .... array-data.lisp isn't needed by sb-grovel any more, and any
             code that uses it will probably break anyway; removed it.
        .... The Manual: Now there's a section on sb-grovel usage.
             sb-grovel's README is no more.

        ... sb-bsd-sockets: It had to learn to use aliens instead of
            non-typechecked lisp arrays. I hope there are no memory leaks.
        ... ditto for sb-posix.

        Thanks to vja for patches & patiently testing my changes on
        x86 and SPARC.
2004-05-27 13:58:15 +00:00
Christophe Rhodes 531b03cfcb 0.8.7.40:
Merge patch (Vincent Arkesteijn sbcl-devel 2004-02-03) for
	ASDF-INSTALL (and my patch lisppaste/113 for namestrings)
	... :name "" no longer prints the same as :name nil
	... make the asdf-install:directorified pathname more
		robustly
	... also add a couple of :supersedes.  ARGH WHY DOES
		SB-BSD-SOCKETS STILL HAVE ITS OWN FAKE SB-GROVELALIKE?
2004-02-03 14:17:08 +00:00
Christophe Rhodes 99501797db 0.8.6.14:
Ouch.  That was hard work.
	... contrib fix primarily for SunOS but also I think for Darwin;
		at least, if it was working it was only by accident.
	... uname -m never returns either "solaris" or "darwin", so that
		code was wrong to start with;
	... change the protocol so that we do EXTRA_CFLAGS rather than
		a complete override; now we don't need the solaris or
		darwin clauses in asdf-module.mk that weren't being used
		anyway;
	... delete more stuff in make-target-contrib.sh so that we can
		actually see the effect of these changes rather than
		blindly reusing an old alien.so (which explains why I
		hadn't noticed this before, *sigh*; I ran a completely
		clean build on Solaris for the first time in months
		yesterday)
	... now sb-bsd-sockets and dependents work again.  I hope I haven't
		broken x86-64 in the process.
2003-11-29 20:41:47 +00:00
Kevin Rosenberg 1a6c2275ab 0.8.4.48:
* Add tools-for-build program to determine if asm/ldt.h has the
	new name for the modify_ldt structure.
	* Fixes to properly compile contribs on x86_64 systems
2003-11-19 13:48:07 +00:00