Displaying 20 results from an estimated 25 matches for "klibcobj".
2020 Aug 29
0
[klibc:riscv64-enable-relax] Kbuild, klcc: Support multiple objects in KLIBCCRTSHARED
...ion string) for a specific extension.
diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc
index bfe6edb3..28b5e856 100644
--- a/scripts/Kbuild.klibc
+++ b/scripts/Kbuild.klibc
@@ -82,6 +82,7 @@ KLIBCCFLAGS :=
# Defaults for arch to override
KLIBCARCHINCFLAGS =
+KLIBCCRTSHARED := $(KLIBCOBJ)/interp.o
# Arch specific definitions for klibc
include $(srctree)/$(KLIBCSRC)/arch/$(KLIBCARCHDIR)/MCONFIG
@@ -141,7 +142,6 @@ KLIBCLIBGCC_DEF := $(shell $(KLIBCCC) $(KLIBCCFLAGS) $(if $(filter gcc,$(cc-nam
KLIBCLIBGCC ?= $(KLIBCLIBGCC_DEF)
KLIBCCRT0 := $(KLIBCOBJ)/arch/$(KLIBCA...
2020 Mar 27
3
[PATCH v2 3/5] Kbuild: use "libc.a" with clang
...cripts/Kbuild.klibc
+++ b/scripts/Kbuild.klibc
@@ -141,6 +141,8 @@ KLIBCSTRIPFLAGS += --strip-all -R .comment -R .note
# Don't attempt to set it if we are using clang.
ifneq ($(cc-name),clang)
KLIBCLIBGCC_DEF := $(shell $(KLIBCCC) $(KLIBCCFLAGS) --print-libgcc)
+else
+KLIBCLIBGCC_DEF := $(KLIBCOBJ)/libc.a
endif
KLIBCLIBGCC ?= $(KLIBCLIBGCC_DEF)
KLIBCCRT0 := $(KLIBCOBJ)/arch/$(KLIBCARCHDIR)/crt0.o
diff --git a/usr/klibc/arch/x86_64/MCONFIG b/usr/klibc/arch/x86_64/MCONFIG
index ac1ac074c00a..a6ba7c85c68b 100644
--- a/usr/klibc/arch/x86_64/MCONFIG
+++ b/usr/klibc/arch/x86_64/MCONFIG...
2020 Mar 29
0
[kvm-unit-tests PATCH v3 1/4] Kbuild: add support for clang builds
...c-option, -fno-stack-protector, ) \
$(call cc-option, -fwrapv, ) \
$(call cc-option, -fno-PIE, ) \
+ $(call cc-option, -fno-builtin-bcmp, ) \
-ggdb
KLIBCARCHREQFLAGS :=
KLIBCOPTFLAGS :=
@@ -108,10 +109,14 @@ KLIBCOBJDUMP := $(OBJDUMP)
# klibc include paths
KLIBCCPPFLAGS := -nostdinc -iwithprefix include \
- -I$(KLIBCINC)/arch/$(KLIBCARCHDIR) \
+ -I$(KLIBCINC)/arch/$(KLIBCARCHDIR) \
-I$(KLIBCINC)/bits$(KLIBCBITSIZE) \
- -I$(KLIBCOBJ)/../include \
+...
2020 Jul 25
0
[klibc:master] Kbuild: add support for clang builds
...c-option, -fno-stack-protector, ) \
$(call cc-option, -fwrapv, ) \
$(call cc-option, -fno-PIE, ) \
+ $(call cc-option, -fno-builtin-bcmp, ) \
-ggdb
KLIBCARCHREQFLAGS :=
KLIBCOPTFLAGS :=
@@ -108,10 +109,14 @@ KLIBCOBJDUMP := $(OBJDUMP)
# klibc include paths
KLIBCCPPFLAGS := -nostdinc -iwithprefix include \
- -I$(KLIBCINC)/arch/$(KLIBCARCHDIR) \
+ -I$(KLIBCINC)/arch/$(KLIBCARCHDIR) \
-I$(KLIBCINC)/bits$(KLIBCBITSIZE) \
- -I$(KLIBCOBJ)/../include \
+...
2020 Mar 27
2
[PATCH v2 1/5] Kbuild: add support for clang builds
...c-version
# Usage gcc-ver := $(call cc-version)
cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC))
diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc
index afc9a546feca..411d7ea9bea6 100644
--- a/scripts/Kbuild.klibc
+++ b/scripts/Kbuild.klibc
@@ -107,8 +107,15 @@ KLIBCOBJCOPY := $(OBJCOPY)
KLIBCOBJDUMP := $(OBJDUMP)
# klibc include paths
-KLIBCCPPFLAGS := -nostdinc -iwithprefix include \
- -I$(KLIBCINC)/arch/$(KLIBCARCHDIR) \
+ifeq ($(cc-name),clang)
+# clang can't find the compiler-specific header <stdarg.h> if -nostdinc
+# is specifie...
2020 Mar 29
7
[kvm-unit-tests PATCH v3 0/4] Update patch set
- Renamed IMAGE_BASE to LD_IMAGE_BASE_OPT.
- Moved "-fcommon" to KLIBCREQFLAGS in scripts/Kbuild.klibc.
- Remove "dash" warning fixes which have been upstreamed.
- Conditionalize the inclusion of compiler flags by using the proper
compiler name or "cc-option".
- Added "-Werror" to "cc-option" to catch flags that cause warnings.
- Retain
2020 Mar 28
0
[PATCH v2 1/5] Kbuild: add support for clang builds
On Fri, 2020-03-27 at 15:29 -0700, Bill Wendling wrote:
> From: Michael Davidson <md at google.com>
>
> Add cc-name to klibc/scripts/Kbuild.include.
[...]
> --- a/scripts/Kbuild.klibc
> +++ b/scripts/Kbuild.klibc
> @@ -107,8 +107,15 @@ KLIBCOBJCOPY := $(OBJCOPY)
> KLIBCOBJDUMP := $(OBJDUMP)
>
> # klibc include paths
> -KLIBCCPPFLAGS := -nostdinc -iwithprefix include \
> - -I$(KLIBCINC)/arch/$(KLIBCARCHDIR) \
> +ifeq ($(cc-name),clang)
> +# clang can't find the compiler-specific header <stdar...
2006 Jun 26
0
[klibc 19/43] klibc basic build infrastructure
...l cut -d. -f1 $(srctree)/usr/klibc/version)
+KLIBCMINOR := $(shell cut -d. -f2 $(srctree)/usr/klibc/version)
+
+# binutils
+KLIBCLD := $(LD)
+KLIBCCC := $(CC)
+KLIBCAR := $(AR)
+KLIBCRANLIB := $(RANLIB)
+KLIBCSTRIP := $(STRIP)
+KLIBCNM := $(NM)
+KLIBCOBJCOPY := $(OBJCOPY)
+KLIBCOBJDUMP := $(OBJDUMP)
+
+# klibc include paths
+KLIBCCPPFLAGS := -I$(KLIBCINC)/arch/$(KLIBCARCHDIR) \
+ -I$(KLIBCINC)/bits$(KLIBCBITSIZE) \
+ -I$(KLIBCOBJ)/../include \
+ -I$(KLIBCINC)
+# kernel include paths
+KLIBCKERNELSRC...
2020 Mar 27
12
[PATCH 0/5] Clang compatibility patches
This is a series of patches for clang compatibility:
- Using flags needed flags and removing unsupported flags.
- Adding support for clang's LLD linker.
- Removing a variety of warnings.
Bill Wendling (3):
[klibc] Kbuild: use "libc.a" with clang
[klibc] Kbuild: Add "-fcommon" for clang builds
[klibc] Clean up clang warnings
Michael Davidson (1):
[klibc] Kbuild:
2020 Mar 28
0
[PATCH v2 3/5] Kbuild: use "libc.a" with clang
...pts/Kbuild.klibc
> @@ -141,6 +141,8 @@ KLIBCSTRIPFLAGS += --strip-all -R .comment -R .note
> # Don't attempt to set it if we are using clang.
> ifneq ($(cc-name),clang)
> KLIBCLIBGCC_DEF := $(shell $(KLIBCCC) $(KLIBCCFLAGS) --print-libgcc)
> +else
> +KLIBCLIBGCC_DEF := $(KLIBCOBJ)/libc.a
> endif
> KLIBCLIBGCC ?= $(KLIBCLIBGCC_DEF)
> KLIBCCRT0 := $(KLIBCOBJ)/arch/$(KLIBCARCHDIR)/crt0.o
> diff --git a/usr/klibc/arch/x86_64/MCONFIG b/usr/klibc/arch/x86_64/MCONFIG
> index ac1ac074c00a..a6ba7c85c68b 100644
> --- a/usr/klibc/arch/x86_64/MCONFIG
> +...
2006 May 24
1
[patch] klibc: merge s390/s390x 2nd try
...AREDFLAGS :=
KLIBCBITSIZE :=
KLIBCLDFLAGS :=
+KLIBCCFLAGS :=
# Arch specific definitions for klibc
-include $(KLIBCSRC)/arch/$(KLIBCARCH)/MCONFIG
+include $(KLIBCSRC)/arch/$(KLIBCARCHDIR)/MCONFIG
# include/asm-* architecture
KLIBCASMARCH ?= $(KLIBCARCH)
@@ -77,7 +78,7 @@ KLIBCOBJCOPY := $(OBJCOPY)
KLIBCOBJDUMP := $(OBJDUMP)
# klibc include paths
-KLIBCCPPFLAGS := -I$(KLIBCINC)/arch/$(KLIBCARCH) \
+KLIBCCPPFLAGS := -I$(KLIBCINC)/arch/$(KLIBCARCHDIR) \
-I$(KLIBCINC)/bits$(KLIBCBITSIZE) \
-I$(KLIBCOBJ)/../include \...
2006 Apr 17
0
[PATCH] kbuild: support single targets for klibc and klibc programs
...index e469623..a3c4cb1 100644
--- a/Makefile
+++ b/Makefile
@@ -181,6 +181,11 @@ UTS_MACHINE := $(ARCH)
# Architecture used to compile user-space code
KLIBCARCH ?= $(subst powerpc,ppc,$(ARCH))
+# klibc definitions
+export KLIBCINC := usr/include
+export KLIBCSRC := $(srctree)/usr/klibc
+export KLIBCOBJ := $(objtree)/usr/klibc
+
# SHELL used by kbuild
CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
else if [ -x /bin/bash ]; then echo /bin/bash; \
@@ -1283,39 +1288,42 @@ # Single targets are compatible with:
# - build whith mixed source and output
# - build with se...
2006 May 11
0
[patch] klibc: merge s390 and s390x
...+57,7 @@ KLIBCBITSIZE :=
KLIBCLDFLAGS :=
# Arch specific definitions for klibc
-include $(KLIBCSRC)/arch/$(KLIBCARCH)/MCONFIG
+include $(KLIBCSRC)/arch/$(KLIBCARCHDIR)/MCONFIG
# klibc version
KLIBCMAJOR := $(shell cut -d. -f1 $(srctree)/usr/klibc/version)
@@ -74,7 +74,7 @@ KLIBCOBJCOPY := $(OBJCOPY)
KLIBCOBJDUMP := $(OBJDUMP)
# klibc include paths
-KLIBCCPPFLAGS := -I$(KLIBCINC)/arch/$(KLIBCARCH) \
+KLIBCCPPFLAGS := -I$(KLIBCINC)/arch/$(KLIBCARCHDIR) \
-I$(KLIBCINC)/bits$(KLIBCBITSIZE) \
-I$(KLIBCINC)
# k...
2019 Jan 20
0
[klibc:master] Kbuild: Add option to install unstripped binaries
...+++ b/scripts/Kbuild.klibc
@@ -100,7 +100,7 @@ KLIBCAR := $(AR)
klibc-ar = $(KLIBCAR) $(if $(KBUILD_REPRODUCIBLE),$(2),$(1))
KLIBCRANLIB := $(call klibc-ar,s,Ds)
-KLIBCSTRIP := $(STRIP)
+KLIBCSTRIP := $(if $(CONFIG_DEBUG_INFO),true,$(STRIP))
KLIBCNM := $(NM)
KLIBCOBJCOPY := $(OBJCOPY)
KLIBCOBJDUMP := $(OBJDUMP)
@@ -136,6 +136,10 @@ KLIBCLIBCSHARED := $(KLIBCOBJ)/libc.so
# How to tell the linker main() is the entrypoint
KLIBCEMAIN ?= -e main
+ifdef CONFIG_DEBUG_INFO
+KLIBCLDFLAGS += --build-id=sha1
+endif
+
#
# This indicates the location of...
2005 Dec 28
0
kbuild: clean a bit better
...ot see how I have missed
all the *.o files. Maybe cogito played me a trick?
Anyway I learned to use git ls-files --others
Sam
diff --git a/Makefile b/Makefile
index 8c500e3..db9b8ac 100644
--- a/Makefile
+++ b/Makefile
@@ -8,6 +8,7 @@ export KLIBCSRC := klibc
export KLIBCINC := include
export KLIBCOBJ := klibc
export KLIBCKERNELSRC := linux/
+include scripts/Kbuild.include
export CC := gcc
NOSTDINC_FLAGS := -nostdlib -nostdinc -isystem $(shell $(CC) -print-file-name=include)
@@ -89,8 +90,29 @@ klibc:
test: klibc
$(Q)$(MAKE) $(klibc)=klibc/tests
+###
+# clean: remove generated file...
2006 Apr 17
0
[PATCH] klibc: generate havesyscall in $(objtree) with make O=..
...Kbuild b/usr/Kbuild
index bc50c48..6ac1959 100644
--- a/usr/Kbuild
+++ b/usr/Kbuild
@@ -4,7 +4,7 @@ #
# klibc definitions - to be moved to top-level Makefile later
export KLIBCSRC := $(srctree)/$(src)/klibc
-export KLIBCINC := $(srctree)/$(src)/include
+export KLIBCINC := $(src)/include
export KLIBCOBJ := $(objtree)/$(obj)/klibc
CONFIG_KLIBC := 1
2020 Aug 29
0
[klibc:riscv64-enable-relax] riscv64: Make linker relaxation work and enable it
...= --no-relax
KLIBCOPTFLAGS += -Os -fomit-frame-pointer
ifeq ($(DEBUG),y)
KLIBCOPTFLAGS += -g
@@ -21,3 +18,6 @@ KLIBCSHAREDFLAGS = $(LD_IMAGE_BASE_OPT) 0x00200000
# Kernel has never used stack trampolines
KLIBCEXECSTACK := n
+
+KLIBCEMAIN := -e _main
+KLIBCCRTSHARED += $(KLIBCOBJ)/arch/riscv64/_main.o
diff --git a/usr/klibc/arch/riscv64/_main.S b/usr/klibc/arch/riscv64/_main.S
new file mode 100644
index 00000000..284a2222
--- /dev/null
+++ b/usr/klibc/arch/riscv64/_main.S
@@ -0,0 +1,17 @@
+#
+# arch/riscv64/_main.S
+#
+# Does arch-specific initialization and invokes main wi...
2020 Aug 29
0
[klibc:riscv64-enable-relax] riscv64: Make linker relaxation work and enable it
...Normal binaries start at 64 KB, so start the libary at 2 MB.
KLIBCSHAREDFLAGS = $(LD_IMAGE_BASE_OPT) 0x00200000
+KLIBCSHAREDFLAGS += --defsym '__global_pointer$$=0'
# Kernel has never used stack trampolines
KLIBCEXECSTACK := n
+
+KLIBCEMAIN := -e _main
+KLIBCCRTSHARED += $(KLIBCOBJ)/arch/riscv64/_main.o
diff --git a/usr/klibc/arch/riscv64/_main.S b/usr/klibc/arch/riscv64/_main.S
new file mode 100644
index 00000000..284a2222
--- /dev/null
+++ b/usr/klibc/arch/riscv64/_main.S
@@ -0,0 +1,17 @@
+#
+# arch/riscv64/_main.S
+#
+# Does arch-specific initialization and invokes main wi...
2006 Jun 26
0
[klibc 09/43] kbuild: support single targets for klibc and klibc programs
...index 897e647..ea1bae0 100644
--- a/Makefile
+++ b/Makefile
@@ -181,6 +181,11 @@ UTS_MACHINE := $(ARCH)
# Architecture used to compile user-space code
KLIBCARCH ?= $(subst powerpc,ppc,$(ARCH))
+# klibc definitions
+export KLIBCINC := usr/include
+export KLIBCSRC := $(srctree)/usr/klibc
+export KLIBCOBJ := $(objtree)/usr/klibc
+
# SHELL used by kbuild
CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
else if [ -x /bin/bash ]; then echo /bin/bash; \
@@ -1281,39 +1286,42 @@ # Single targets are compatible with:
# - build whith mixed source and output
# - build with se...
2006 Apr 17
0
[PATCH] klibc: rebuild cpio image when content changes
...tput_file is set we will generate cpio archive and gzip it
# we are carefull to delete tmp files
if [ ! -z ${output_file} ]; then
diff --git a/usr/Kbuild b/usr/Kbuild
index c4f5be2..e338cf9 100644
--- a/usr/Kbuild
+++ b/usr/Kbuild
@@ -8,21 +8,38 @@ export KLIBCINC := $(srctree)/$(src)/inc
export KLIBCOBJ := $(objtree)/$(obj)/klibc
CONFIG_KLIBC := 1
+klibc-subdir := klibc
+usr-subdirs := kinit utils dash gzip
+subdir- := $(klibc-subdir) $(usr-subdirs)
+
+usr-subdirs := $(addprefix _usr_,$(usr-subdirs))
+klibc-subdir := $(addprefix _usr_,$(klibc-subdir))
+
# Klibc binaries
ifdef CONFIG_KL...