[syslinux:master] com32.mk: remove

syslinux-bot for H. Peter Anvin (Intel) hpa at zytor.com
Wed Feb 20 17:55:13 PST 2019


Commit-ID:  deadfeba35cdf39d6647b15f9435975a981928d6
Gitweb:     http://www.syslinux.org/commit/deadfeba35cdf39d6647b15f9435975a981928d6
Author:     H. Peter Anvin (Intel) <hpa at zytor.com>
AuthorDate: Thu, 7 Feb 2019 13:36:28 -0800
Committer:  H. Peter Anvin (Intel) <hpa at zytor.com>
CommitDate: Thu, 7 Feb 2019 13:50:42 -0800

com32.mk: remove

The file com32.mk is no longer used, as we don't use the traditional
com32 format anymore (and haven't since version 4.xx).

Signed-off-by: H. Peter Anvin (Intel) <hpa at zytor.com>

---
 com32/gdbstub/Makefile   |   6 +--
 com32/libupload/Makefile |   4 +-
 mk/com32.mk              | 121 -----------------------------------------------
 3 files changed, 5 insertions(+), 126 deletions(-)

diff --git a/com32/gdbstub/Makefile b/com32/gdbstub/Makefile
index 38d003cc..10c9c546 100644
--- a/com32/gdbstub/Makefile
+++ b/com32/gdbstub/Makefile
@@ -16,7 +16,7 @@
 
 topdir = ../..
 MAKEDIR = $(topdir)/mk
-include $(MAKEDIR)/com32.mk
+include $(MAKEDIR)/lib.mk
 
 CFLAGS += -fPIE
 
@@ -30,8 +30,8 @@ OBJS = main.o int.o serial.o gdbstub.o
 
 all: $(MODULES) $(TESTFILES)
 
-gdbstub.elf : $(OBJS) $(LIBS) $(C_LIBS)
-	$(LD) $(LDFLAGS) -o $@ $^
+gdbstub.elf : $(OBJS)
+	$(LD) -shared $(LDFLAGS) -soname $(patsubst %.elf,%.c32,$(@F)) -o $@ $^
 
 tidy dist clean:
 	rm -f *.o *.lo *.a *.lst *.elf .*.d *.tmp
diff --git a/com32/libupload/Makefile b/com32/libupload/Makefile
index a7799136..db5a8c41 100644
--- a/com32/libupload/Makefile
+++ b/com32/libupload/Makefile
@@ -1,8 +1,8 @@
 # Include configuration rules
 VPATH = $(SRC)
-include $(MAKEDIR)/com32.mk
+include $(MAKEDIR)/lib.mk
 
-REQFLAGS += -I$(SRC)
+REQFLAGS += -I$(SRC) -I$(topdir)/core
 
 LIBOBJS := $(notdir $(patsubst %.c,%.o,$(sort $(wildcard $(SRC)/*.c))))
 
diff --git a/mk/com32.mk b/mk/com32.mk
deleted file mode 100644
index aeb8a2cc..00000000
--- a/mk/com32.mk
+++ /dev/null
@@ -1,121 +0,0 @@
-## -*- makefile -*- -------------------------------------------------------
-##
-##   Copyright 2008-2009 H. Peter Anvin - All Rights Reserved
-##   Copyright 2009 Intel Corporation; author: H. Peter Anvin
-##
-##   This program is free software; you can redistribute it and/or modify
-##   it under the terms of the GNU General Public License as published by
-##   the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
-##   Boston MA 02110-1301, USA; either version 2 of the License, or
-##   (at your option) any later version; incorporated herein by reference.
-##
-## -----------------------------------------------------------------------
-
-##
-## COM32 common configurables
-##
-
-include $(MAKEDIR)/syslinux.mk
-
-# Support IA32 and x86_64 platforms with one build
-# Set up architecture specifics; for cross compilation, set ARCH as apt
-GCCOPT := $(call gcc_ok,-std=gnu99,)
-ifeq ($(strip $(ARCH)),i386)
-	GCCOPT += $(call gcc_ok,-m32,)
-	GCCOPT += $(call gcc_ok,-march=i386)
-	GCCOPT += $(call gcc_ok,-mpreferred-stack-boundary=2,)
-	GCCOPT += $(call gcc_ok,-incoming-stack-boundary=2,)
-endif
-ifeq ($(strip $(ARCH)),x86_64)
-	GCCOPT += $(call gcc_ok,-m64,)
-	GCCOPT += $(call gcc_ok,-march=x86-64)
-	#let the stack-boundary default to whatever it is on 64bit
-	#GCCOPT += $(call gcc_ok,-mpreferred-stack-boundary=8,)
-	#GCCOPT += $(call gcc_ok,-incoming-stack-boundary=8,)
-endif
-GCCOPT += $(call gcc_ok,-fno-stack-protector,)
-GCCOPT += $(call gcc_ok,-fwrapv,)
-GCCOPT += $(call gcc_ok,-freg-struct-return,)
-GCCOPT += -Os
-# Note -fPIE does not work with ld on x86_64, try -fPIC instead
-# Does BIOS build require -fPIE?
-GCCOPT += $(call gcc_ok,-fPIC)
-GCCOPT += $(call gcc_ok,-fno-exceptions,)
-GCCOPT += $(call gcc_ok,-fno-asynchronous-unwind-tables,)
-GCCOPT += $(call gcc_ok,-fno-strict-aliasing,)
-GCCOPT += $(call gcc_ok,-falign-functions=0,-malign-functions=0)
-GCCOPT += $(call gcc_ok,-falign-jumps=0,-malign-jumps=0)
-GCCOPT += $(call gcc_ok,-falign-labels=0,-malign-labels=0)
-GCCOPT += $(call gcc_ok,-falign-loops=0,-malign-loops=0)
-
-ifeq ($(FWCLASS),EFI)
-GCCOPT += -mno-red-zone
-else
-GCCOPT += -mregparm=3 -DREGPARM=3
-endif
-
-com32  := $(topdir)/com32
-
-ifneq ($(NOGPL),1)
-GPLLIB     = $(com32)/gpllib/libcom32gpl.a
-GPLINCLUDE = -I$(com32)/gplinclude
-else
-GPLLIB     =
-GPLINCLUDE =
-endif
-
-CFLAGS     = $(GCCOPT) $(GCCWARN) \
-	     -fomit-frame-pointer -D__COM32__ -D__FIRMWARE_$(FIRMWARE)__ \
-	     -nostdinc -iwithprefix include \
-	     -I$(com32)/libutil/include -I$(com32)/include \
-	     -I$(com32)/include/sys $(GPLINCLUDE) \
-	     -I$(topdir)/core \
-	     -I$(topdir)/core/include
-SFLAGS     = $(GCCOPT) $(GCCWARN) \
-	     -fomit-frame-pointer -D__COM32__ -D__FIRMWARE_$(FIRMWARE)__ \
-	     -nostdinc -iwithprefix include \
-	     -I$(com32)/libutil/include -I$(com32)/include \
-	     -I$(com32)/include/sys $(GPLINCLUDE) \
-	     -I$(topdir)/core \
-	     -I$(topdir)/core/include
-
-COM32LD	   = $(com32)/lib/$(ARCH)/elf.ld
-LDFLAGS    = -m elf_$(ARCH) -shared --hash-style=gnu -T $(COM32LD)
-LIBGCC    := $(shell $(CC) $(GCCOPT) --print-libgcc)
-
-LNXCFLAGS  = -I$(com32)/libutil/include $(GCCWARN) -O -g \
-	     -D_GNU_SOURCE -D_FORTIFY_SOURCE=0 -Wno-error
-LNXSFLAGS  = -g
-LNXLDFLAGS = -g
-
-C_LIBS	   = $(GPLLIB) $(com32)/lib/libcom32.c32 $(LIBGCC)
-C_LNXLIBS  = $(com32)/libutil/libutil_lnx.a
-
-.SUFFIXES: .lss .c .lo .o .elf .c32 .lnx
-
-.PRECIOUS: %.o
-%.o: %.S
-	$(CC) $(MAKEDEPS) $(SFLAGS) -c -o $@ $<
-
-.PRECIOUS: %.o
-%.o: %.c
-	$(CC) $(MAKEDEPS) $(CFLAGS) -c -o $@ $<
-
-.PRECIOUS: %.elf
-%.elf: %.o $(LIBS) $(C_LIBS) $(COM32LD)
-	$(LD) $(LDFLAGS) -o $@ $(filter-out $(COM32LD),$^)
-
-.PRECIOUS: %.lo
-%.lo: %.S
-	$(CC) $(MAKEDEPS) $(LNXSFLAGS) -c -o $@ $<
-
-.PRECIOUS: %.lo
-%.lo: %.c
-	$(CC) $(MAKEDEPS) $(LNXCFLAGS) -c -o $@ $<
-
-.PRECIOUS: %.lnx
-%.lnx: %.lo $(LNXLIBS) $(C_LNXLIBS)
-	$(CC) $(LNXCFLAGS) -o $@ $^
-
-%.c32: %.elf
-	$(OBJCOPY) --strip-debug --strip-unneeded $< $@


More information about the Syslinux-commits mailing list