messing with a fresh compile on slackware64-current

a few library paths and then redundant functions
This commit is contained in:
Vincent Batts 2018-10-31 10:52:13 -04:00
parent 2b5c5002e1
commit 5863943b0f
Signed by: vbatts
GPG Key ID: 10937E57733F1362
3 changed files with 5 additions and 37 deletions

View File

@ -57,14 +57,14 @@ CONFIG_machspec_netconfig=y
EFIINC = /usr/include/efi EFIINC = /usr/include/efi
GNUEFILIB = /usr/lib GNUEFILIB = /usr/lib
EFILIB = /usr/lib EFILIB = /usr/lib
EFICRT0 = /usr/lib EFICRT0 = $(EFILIB)/gnuefi
CDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi) CDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
TOPDIR = TOPDIR =
ALLSUBDIRS = ia32 ia64 x86_64 fs choosers devschemes tools ALLSUBDIRS = ia32 ia64 x86_64 fs choosers devschemes tools
HOSTARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH | sed s,i[3456789]86,ia32, | sed s,amd64,x86_64, ) HOSTARCH = $(shell uname -m | sed s,i[3456789]86,ia32, | sed s,amd64,x86_64, )
ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH | sed s,i[3456789]86,ia32, | sed s,amd64,x86_64, ) ARCH := $(shell uname -m | sed s,i[3456789]86,ia32, | sed s,amd64,x86_64, )
INCDIR = -I. -I$(TOPDIR) -I$(EFIINC) -I$(EFIINC)/$(ARCH) -I$(EFIINC)/protocol -I$(TOPDIR)/efi110 INCDIR = -I. -I$(TOPDIR) -I$(EFIINC) -I$(EFIINC)/$(ARCH) -I$(EFIINC)/protocol -I$(TOPDIR)/efi110
CPPFLAGS = -DCONFIG_$(ARCH) CPPFLAGS = -DCONFIG_$(ARCH)
@ -111,14 +111,12 @@ OBJCOPY = $(prefix)objcopy
# Use Modified binutils that supports x86_64 using UEFI ABI # Use Modified binutils that supports x86_64 using UEFI ABI
ifeq ($(ARCH), x86_64) ifeq ($(ARCH), x86_64)
ifeq ($(HOSTARCH), ia32)
ARCH3264 = -m64 ARCH3264 = -m64
LD3264 = -melf_x86_64 LD3264 = -melf_x86_64
GNUEFILIB := $(GNUEFILIB)64 GNUEFILIB := $(GNUEFILIB)64
EFILIB := $(EFILIB)64 EFILIB := $(EFILIB)64
EFICRT0 := $(EFICRT0)64 EFICRT0 := $(EFILIB)/gnuefi
endif
CFLAGS += -DEFI_FUNCTION_WRAPPER CFLAGS += -DEFI_FUNCTION_WRAPPER
OBJCOPY = /usr/bin/objcopy OBJCOPY = /usr/bin/objcopy
@ -131,7 +129,7 @@ ifeq ($(ARCH), ia32)
GNUEFILIB := /usr/lib32 GNUEFILIB := /usr/lib32
EFILIB := /usr/lib32 EFILIB := /usr/lib32
EFICRT0 := /usr/lib32 EFICRT0 := /usr/lib32/gnuefi
endif endif
endif endif

View File

@ -36,34 +36,6 @@ StrChr(IN const CHAR16 *s, IN const CHAR16 c)
return (CHAR16 *)s; return (CHAR16 *)s;
} }
CHAR16 *
StrnCpy(OUT CHAR16 *dst, IN const CHAR16 *src, IN UINTN size)
{
CHAR16 *res = dst;
while (size && size-- && (*dst++ = *src++) != CHAR_NULL);
/*
* does the null padding
*/
while (size && size-- > 0) *dst++ = CHAR_NULL;
return res;
}
CHAR8 *
StrnXCpy(OUT CHAR8 *dst, IN const CHAR16 *src, IN UINTN size)
{
CHAR8 *res = dst;
while (size && size-- && (*dst++ = (CHAR8)*src++) != '\0');
/*
* does the null padding
*/
while (size && size-- > 0) *dst++ = '\0';
return res;
}
VOID VOID
U2ascii(CHAR16 *in, CHAR8 *out, UINTN maxlen) U2ascii(CHAR16 *in, CHAR8 *out, UINTN maxlen)
{ {

View File

@ -27,8 +27,6 @@
#define __STROPS_H__ #define __STROPS_H__
extern CHAR16 *StrChr(IN const CHAR16 *s, const CHAR16 c); extern CHAR16 *StrChr(IN const CHAR16 *s, const CHAR16 c);
extern CHAR16 *StrnCpy(OUT CHAR16 *dst, IN const CHAR16 *src, UINTN count);
extern CHAR8 *StrnXCpy(OUT CHAR8 *dst, IN const CHAR16 *src, UINTN count);
extern CHAR8 *strtok_simple(CHAR8 *in, CHAR8 c); extern CHAR8 *strtok_simple(CHAR8 *in, CHAR8 c);
extern CHAR8 *strrchra(IN const CHAR8 *s, const INTN c); extern CHAR8 *strrchra(IN const CHAR8 *s, const INTN c);