Skip to content

Commit

Permalink
Stop using /usr/bin/as on FreeBSD; also don't emit .stabs
Browse files Browse the repository at this point in the history
On FreeBSD 13, /usr/bin/as does not even exist.
  • Loading branch information
xrme committed Aug 8, 2023
1 parent f7ff261 commit f55cc28
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions lisp-kernel/freebsdx8664/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ VC_REVISION != sh -c "git describe --dirty 2>/dev/null || echo unknown"

VPATH = ..
RM = /bin/rm
AS = as
M4 = m4
ASFLAGS = --64
M4FLAGS = -DFREEBSD -DX86 -DX8664 -DHAVE_TLS
CDEFINES = -DFREEBSD -D_REENTRANT -DX86 -DX8664 -D_GNU_SOURCE -DHAVE_TLS -DVC_REVISION="$(VC_REVISION)"
CDEBUG = -g
Expand All @@ -28,7 +26,6 @@ COPT = #-O2
# however.
WFORMAT = -Wno-format
PLATFORM_H = platform-freebsdx8664.h
LDFLAGS=-Wl,-O0

SPOBJ = pad.o x86-spjump64.o x86-spentry64.o x86-subprims64.o
ASMOBJ = x86-asmutils64.o imports.o
Expand Down Expand Up @@ -56,12 +53,12 @@ all: ../../fx86cl64
OSLIBS = -lm -lthr

.s.o:
$(M4) $(M4FLAGS) -I../ $< | $(AS) $(ASFLAGS) -o $@
$(M4) $(M4FLAGS) -I../ $< | clang -c -g -x assembler -o $@ -
.c.o:
$(CC) -include ../$(PLATFORM_H) -c $< $(CDEFINES) $(CDEBUG) $(COPT) $(WFORMAT) -m64 -o $@

../../fx86cl64: $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ)
$(CC) -v -m64 $(CDEBUG) -Wl,--export-dynamic $(LDFLAGS) -o $@ $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) $(OSLIBS)
$(CC) -m64 $(CDEBUG) -Wl,--export-dynamic -o $@ $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) $(OSLIBS)


$(SPOBJ): $(SPINC)
Expand Down
2 changes: 1 addition & 1 deletion lisp-kernel/m4macros.m4
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ ifdef(`LINUX',`define(`SYSstabs',`ELFstabs')
define(`rTOC',`r2')', `
define(`EABI',`')')')

ifdef(`FREEBSD',`define(`SYSstabs',`ELFstabs')
ifdef(`FREEBSD',`define(`SYSstabs',`NOstabs')
define(`HaveWeakSymbols',`')
define(`LocalLabelPrefix',`.L')
define(`MacroLabelPrefix',`.L__')
Expand Down

0 comments on commit f55cc28

Please sign in to comment.