Update to racket 8.1.
Enable CS on i386. Tested on amd64 and sparc64.
This commit is contained in:
parent
42c3d3c724
commit
c19dbbb089
@ -1,11 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.70 2021/03/11 22:08:43 juanfra Exp $
|
||||
# $OpenBSD: Makefile,v 1.71 2021/05/19 19:21:24 juanfra Exp $
|
||||
|
||||
ONLY_FOR_ARCHS = aarch64 amd64 arm i386 mips64el powerpc powerpc64 sparc64
|
||||
|
||||
COMMENT = multi-paradigm programming language
|
||||
|
||||
V = 7.9
|
||||
REVISION = 0
|
||||
V = 8.1
|
||||
PKGNAME = racket-minimal-$V
|
||||
DISTFILES = racket-minimal-$V-src-builtpkgs${EXTRACT_SUFX} \
|
||||
racket-openbsd-1${EXTRACT_SUFX}
|
||||
@ -93,10 +92,11 @@ CFLAGS += -ggdb3
|
||||
# https://github.com/racket/racket/issues/1239
|
||||
# - Racket builds fine with -O2 (and -O1 and -Os) on powerpc but
|
||||
# it doesn't pass the tests.
|
||||
# - CS only supports OpenBSD on amd64.
|
||||
# - CS only supports OpenBSD on amd64. And maybe i386.
|
||||
.if ${FLAVOR:Mno_jit}
|
||||
ONLY_FOR_ARCHS = arm amd64 i386 powerpc
|
||||
CONFIGURE_ARGS += --disable-jit \
|
||||
CONFIGURE_ARGS += --enable-bcdefault \
|
||||
--disable-jit \
|
||||
--disable-places \
|
||||
--disable-futures
|
||||
.elif ${MACHINE_ARCH} == "amd64"
|
||||
@ -104,21 +104,24 @@ CONFIGURE_ARGS += --enable-csdefault \
|
||||
--enable-places \
|
||||
--enable-futures
|
||||
.elif ${MACHINE_ARCH} == "i386"
|
||||
CONFIGURE_ARGS += --enable-jit \
|
||||
CONFIGURE_ARGS += --enable-csdefault \
|
||||
--enable-places \
|
||||
--enable-futures
|
||||
.elif ${MACHINE_ARCH} == "arm"
|
||||
CONFIGURE_ARGS += --enable-jit \
|
||||
CONFIGURE_ARGS += --enable-bcdefault \
|
||||
--enable-jit \
|
||||
--disable-places \
|
||||
--disable-futures
|
||||
.elif ${MACHINE_ARCH} == "powerpc"
|
||||
CONFIGURE_ARGS += --enable-jit \
|
||||
CONFIGURE_ARGS += --enable-bcdefault \
|
||||
--enable-jit \
|
||||
--disable-places \
|
||||
--disable-futures
|
||||
CONFIGURE_ENV += CFLAGS="${CFLAGS} -O0 -Wall -Wno-unused-value" \
|
||||
CPPFLAGS="${CPPFLAGS} -O0 -Wall -Wno-unused-value"
|
||||
.else
|
||||
CONFIGURE_ARGS += --disable-jit \
|
||||
CONFIGURE_ARGS += --enable-bcdefault \
|
||||
--disable-jit \
|
||||
--disable-places \
|
||||
--disable-futures
|
||||
.endif
|
||||
@ -126,6 +129,8 @@ CONFIGURE_ARGS += --disable-jit \
|
||||
# The embedded versions of BC and CS use different files
|
||||
.if ${MACHINE_ARCH} == "amd64" && !${FLAVOR:Mno_jit}
|
||||
PKG_ARGS += -Dbc=0 -Dcs=1
|
||||
.elif ${MACHINE_ARCH} == "i386" && !${FLAVOR:Mno_jit}
|
||||
PKG_ARGS += -Dbc=0 -Dcs=1
|
||||
.else
|
||||
PKG_ARGS += -Dbc=1 -Dcs=0
|
||||
.endif
|
||||
@ -154,7 +159,7 @@ CONFIGURE_ARGS += --disable-extflonum
|
||||
# The easiest workaround is to pass the CFLAGS also as CPPFLAGS.
|
||||
CONFIGURE_ENV += CFLAGS="${CFLAGS} -msse -msse2 -mfpmath=sse" \
|
||||
CPPFLAGS="${CPPFLAGS} -msse -msse2 -mfpmath=sse"
|
||||
CONFIGURE_ARGS += --enable-extflonum
|
||||
# XXX CONFIGURE_ARGS += --enable-extflonum
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,4 +1,4 @@
|
||||
SHA256 (racket-minimal-7.9-src-builtpkgs.tgz) = KTqo73CaYkBHLxaDM1G6ZqnkYSYdKBPH+xzF3fWcMAA=
|
||||
SHA256 (racket-minimal-8.1-src-builtpkgs.tgz) = pz+9cvFO0M3Htca3BAQW3getORlpjFdU56i/i6zhXFk=
|
||||
SHA256 (racket-openbsd-1.tgz) = A41JvC/qwnaia8Umknoh+XQIOVtWVvG/231AdAeXe30=
|
||||
SIZE (racket-minimal-7.9-src-builtpkgs.tgz) = 31318154
|
||||
SIZE (racket-minimal-8.1-src-builtpkgs.tgz) = 24172851
|
||||
SIZE (racket-openbsd-1.tgz) = 276
|
||||
|
@ -1,52 +0,0 @@
|
||||
$OpenBSD: patch-src_bc_cmdline_inc,v 1.1 2021/03/11 22:08:43 juanfra Exp $
|
||||
|
||||
https://github.com/racket/racket/issues/3717
|
||||
"cs: fix raco exe for OpenBSD"
|
||||
|
||||
Index: src/bc/cmdline.inc
|
||||
--- src/bc/cmdline.inc.orig
|
||||
+++ src/bc/cmdline.inc
|
||||
@@ -766,6 +766,8 @@ static int run_from_cmd_line(int argc, char *_argv[],
|
||||
argv[0] = "-m";
|
||||
else if (!strcmp("--name", argv[0]))
|
||||
argv[0] = "-N";
|
||||
+ else if (!strcmp("--exec", argv[0]))
|
||||
+ argv[0] = "-E";
|
||||
else if (!strcmp("--no-compiled", argv[0]))
|
||||
argv[0] = "-c";
|
||||
else if (!strcmp("--no-lib", argv[0]))
|
||||
@@ -1015,6 +1017,7 @@ static int run_from_cmd_line(int argc, char *_argv[],
|
||||
eval_kind[num_enl++] = mzcmd_EMBEDDED;
|
||||
break;
|
||||
case 'N':
|
||||
+ case 'E':
|
||||
if (argc < 2) {
|
||||
PRINTF("%s: missing name after %s switch\n",
|
||||
prog,
|
||||
@@ -1023,13 +1026,16 @@ static int run_from_cmd_line(int argc, char *_argv[],
|
||||
}
|
||||
argv++;
|
||||
--argc;
|
||||
- sprog = argv[0];
|
||||
- if (!*sprog) {
|
||||
+ if (!*(argv[0])) {
|
||||
PRINTF("%s: empty path after %s switch\n",
|
||||
prog,
|
||||
real_switch);
|
||||
goto show_need_help;
|
||||
}
|
||||
+ if (*str == 'N')
|
||||
+ sprog = argv[0];
|
||||
+ else
|
||||
+ prog = argv[0];
|
||||
was_config_flag = 1;
|
||||
break;
|
||||
case 'q':
|
||||
@@ -1438,6 +1444,7 @@ static int run_from_cmd_line(int argc, char *_argv[],
|
||||
" -R <paths>, --compiled <paths> : Set compiled-file search roots to <paths>\n"
|
||||
" -C, --cross : Cross-build mode; save current collects and config as host\n"
|
||||
" -N <file>, --name <file> : Sets `(find-system-path 'run-file)' to <file>\n"
|
||||
+ " -E <file>, --exec <file> : Sets `(find-system-path 'exec-file)' to <file>\n"
|
||||
# ifdef CMDLINE_STDIO_FLAG
|
||||
" -J <name>, ---wm-class <name> : Set WM_CLASS class to <name> (Unix)\n"
|
||||
# endif
|
@ -1,33 +0,0 @@
|
||||
$OpenBSD: patch-src_cs_c_main_c,v 1.1 2021/03/11 22:08:43 juanfra Exp $
|
||||
|
||||
https://github.com/racket/racket/issues/3717
|
||||
"cs: fix raco exe for OpenBSD"
|
||||
|
||||
Index: src/cs/c/main.c
|
||||
--- src/cs/c/main.c.orig
|
||||
+++ src/cs/c/main.c
|
||||
@@ -172,7 +172,7 @@ static char *get_self_path(char *exec_file)
|
||||
# undef USE_GENERIC_GET_SELF_PATH
|
||||
#endif
|
||||
|
||||
-#if defined(__FreeBSD__)
|
||||
+#if defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
# include <sys/sysctl.h>
|
||||
# include <errno.h>
|
||||
static char *get_self_path(char *exec_file)
|
||||
@@ -183,9 +183,15 @@ static char *get_self_path(char *exec_file)
|
||||
int r;
|
||||
|
||||
mib[0] = CTL_KERN;
|
||||
+#if defined(__NetBSD__)
|
||||
+ mib[1] = KERN_PROC_ARGS;
|
||||
+ mib[2] = getpid();
|
||||
+ mib[3] = KERN_PROC_PATHNAME;
|
||||
+#else
|
||||
mib[1] = KERN_PROC;
|
||||
mib[2] = KERN_PROC_PATHNAME;
|
||||
mib[3] = -1;
|
||||
+#endif
|
||||
|
||||
r = sysctl(mib, 4, NULL, &len, NULL, 0);
|
||||
if (r < 0) {
|
@ -1,18 +0,0 @@
|
||||
$OpenBSD: patch-src_cs_main_help_ss,v 1.1 2021/03/11 22:08:43 juanfra Exp $
|
||||
|
||||
https://github.com/racket/racket/issues/3717
|
||||
"cs: fix raco exe for OpenBSD"
|
||||
|
||||
Index: src/cs/main/help.ss
|
||||
--- src/cs/main/help.ss.orig
|
||||
+++ src/cs/main/help.ss
|
||||
@@ -51,7 +51,8 @@
|
||||
" -U, --no-user-path : Ignore user-specific collects, etc.\n"
|
||||
" -R <paths>, --compiled <paths> : Set compiled-file search roots to <paths>\n"
|
||||
" -C, --cross : Cross-build mode; save current collects and config as host\n"
|
||||
- " -N <file>, --name <file> : Sets `(find-system-path 'run-file)' to <file>\n"))
|
||||
+ " -N <file>, --name <file> : Sets `(find-system-path 'run-file)' to <file>\n"
|
||||
+ " -E <file>, --exec <file> : Sets `(find-system-path 'exec-file)' to <file>\n"))
|
||||
(when gracket?
|
||||
(#%printf
|
||||
" -J <name>, ---wm-class <name> : Set WM_CLASS class to <name> (Unix)\n"))
|
@ -1,72 +0,0 @@
|
||||
$OpenBSD: patch-src_cs_main_sps,v 1.1 2021/03/11 22:08:43 juanfra Exp $
|
||||
|
||||
https://github.com/racket/racket/issues/3717
|
||||
"cs: fix raco exe for OpenBSD"
|
||||
|
||||
Index: src/cs/main.sps
|
||||
--- src/cs/main.sps.orig
|
||||
+++ src/cs/main.sps
|
||||
@@ -270,8 +270,8 @@
|
||||
[else
|
||||
(values (car args) (append (reverse accum) (cdr args)))])))
|
||||
|
||||
- (define (check-path-arg what flag within-flag)
|
||||
- (when (equal? what "")
|
||||
+ (define (check-path-arg path what flag within-flag)
|
||||
+ (when (equal? path "")
|
||||
(error 'racket "empty ~a after ~a switch" what (or within-flag flag))))
|
||||
|
||||
(define (raise-bad-switch arg within-arg)
|
||||
@@ -357,6 +357,7 @@
|
||||
(let-values ([(file-name rest-args) (next-arg "file name" arg within-arg args)])
|
||||
(add-namespace-require-load! `(file ,file-name) file-name)
|
||||
(no-init! saw)
|
||||
+ (check-path-arg file-name "file name" arg within-arg)
|
||||
(set-run-file! (string->path file-name))
|
||||
(flags-loop (cons "--" rest-args) (see saw 'non-config 'lib)))]
|
||||
[("-f" "--load")
|
||||
@@ -368,6 +369,7 @@
|
||||
(let-values ([(file-name rest-args) (next-arg "file name" arg within-arg args)])
|
||||
(set! loads (cons (lambda () (load file-name))
|
||||
loads))
|
||||
+ (check-path-arg file-name "file name" arg within-arg)
|
||||
(set-run-file! (string->path file-name))
|
||||
(flags-loop (cons "--" rest-args) (see saw 'non-config)))]
|
||||
[("-e" "--eval")
|
||||
@@ -452,18 +454,18 @@
|
||||
(cond
|
||||
[(equal? collects-path "")
|
||||
(set! init-collects-dir 'disable)]
|
||||
- [else
|
||||
- (check-path-arg "collects path" arg within-arg)
|
||||
+ [else
|
||||
+ (check-path-arg collects-path "collects path" arg within-arg)
|
||||
(set! init-collects-dir (path->complete-path (->path (find-original-bytes collects-path))))])
|
||||
(loop rest-args))]
|
||||
[("-S" "--search")
|
||||
(let-values ([(collects-path rest-args) (next-arg "path" arg within-arg args)])
|
||||
- (check-path-arg "collects path" collects-path within-arg)
|
||||
+ (check-path-arg collects-path "collects path" collects-path within-arg)
|
||||
(set! rev-collects-post-extra (cons (->path (find-original-bytes collects-path)) rev-collects-post-extra))
|
||||
(loop rest-args))]
|
||||
[("-G" "--config")
|
||||
(let-values ([(config-path rest-args) (next-arg "config path" arg within-arg args)])
|
||||
- (check-path-arg "config path" config-path within-arg)
|
||||
+ (check-path-arg config-path "config path" config-path within-arg)
|
||||
(set! init-config-dir (path->complete-path (->path (find-original-bytes config-path))))
|
||||
(loop rest-args))]
|
||||
[("-C" "--cross")
|
||||
@@ -500,7 +502,13 @@
|
||||
(loop rest-args))]
|
||||
[("-N" "--name")
|
||||
(let-values ([(name rest-args) (next-arg "name" arg within-arg args)])
|
||||
+ (check-path-arg name "name" arg within-arg)
|
||||
(set-run-file! (string->path name))
|
||||
+ (loop rest-args))]
|
||||
+ [("-E" "--exec")
|
||||
+ (let-values ([(name rest-args) (next-arg "name" arg within-arg args)])
|
||||
+ (check-path-arg name "name" arg within-arg)
|
||||
+ (set-exec-file! (string->path name))
|
||||
(loop rest-args))]
|
||||
[("-J")
|
||||
(cond
|
@ -1,36 +0,0 @@
|
||||
$OpenBSD: patch-src_start_ustart_c,v 1.1 2021/03/11 22:08:43 juanfra Exp $
|
||||
|
||||
https://github.com/racket/racket/issues/3717
|
||||
"cs: fix raco exe for OpenBSD"
|
||||
|
||||
Index: src/start/ustart.c
|
||||
--- src/start/ustart.c.orig
|
||||
+++ src/start/ustart.c
|
||||
@@ -456,7 +456,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
data = (char *)malloc(end - prog_end);
|
||||
- new_argv = (char **)malloc((count + argc + (2 * collcount) + 10) * sizeof(char*));
|
||||
+ new_argv = (char **)malloc((count + argc + (2 * collcount) + 12) * sizeof(char*));
|
||||
|
||||
fd = open(me, O_RDONLY, 0);
|
||||
lseek(fd, prog_end, SEEK_SET);
|
||||
@@ -495,10 +495,17 @@ int main(int argc, char **argv)
|
||||
putenv(dll_path);
|
||||
}
|
||||
|
||||
- new_argv[0] = me;
|
||||
+ new_argv[0] = exe_path;
|
||||
|
||||
argpos = 1;
|
||||
inpos = 1;
|
||||
+
|
||||
+ /* Add -E flag; we can't just put `me` in `argv[0]`, because some
|
||||
+ OSes (well, just OpenBSD) cannot find the executable path of a
|
||||
+ process, and the actual executable may be needed to find embedded
|
||||
+ boot images. */
|
||||
+ new_argv[argpos++] = "-E";
|
||||
+ new_argv[argpos++] = me;
|
||||
|
||||
/* Keep all X11 flags to the front: */
|
||||
if (x11) {
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user