blob: 35e69cbe4d8f937241fba8e0adba1743ac7c91e9 [file] [log] [blame]
Uwe Hermann661e3802008-03-21 18:37:23 +00001##
Uwe Hermann661e3802008-03-21 18:37:23 +00002##
3## Copyright (C) 2008 Advanced Micro Devices, Inc.
4##
5## Redistribution and use in source and binary forms, with or without
6## modification, are permitted provided that the following conditions
7## are met:
8## 1. Redistributions of source code must retain the above copyright
9## notice, this list of conditions and the following disclaimer.
10## 2. Redistributions in binary form must reproduce the above copyright
11## notice, this list of conditions and the following disclaimer in the
12## documentation and/or other materials provided with the distribution.
13## 3. The name of the author may not be used to endorse or promote products
14## derived from this software without specific prior written permission.
15##
16## THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17## ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19## ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20## FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21## DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22## OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23## HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24## LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25## OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26## SUCH DAMAGE.
27##
Jordan Crousef6145c32008-03-19 23:56:58 +000028
Arthur Heymans668b8cc2023-08-25 13:09:31 +020029ifneq ($(CONFIG_LP_COMPILER_LLVM_CLANG),y)
Subrata Banikafa39102024-05-18 12:26:40 +000030ifeq ($(CONFIG_LP_ARCH_X86_64),y)
31CFLAGS += -mpreferred-stack-boundary=4
32else
Stefan Reinauer909b9162015-07-01 11:31:40 -070033CFLAGS += -mpreferred-stack-boundary=2
Arthur Heymans668b8cc2023-08-25 13:09:31 +020034endif
Subrata Banikafa39102024-05-18 12:26:40 +000035endif
Stefan Reinauer909b9162015-07-01 11:31:40 -070036
Subrata Banikafa39102024-05-18 12:26:40 +000037libc-$(CONFIG_LP_ARCH_X86_32) += head.S
38libc-$(CONFIG_LP_ARCH_X86_64) += head_64.S
39libc-$(CONFIG_LP_ARCH_X86_64) += pt.S
Patrick Georgib3db79e2011-04-21 18:48:50 +020040libc-y += main.c sysinfo.c
41libc-y += timer.c coreboot.c util.S
Subrata Banikafa39102024-05-18 12:26:40 +000042libc-y += virtual.c
Hsin-Te Yuancb28d642022-08-09 15:00:55 +080043libc-y += selfboot.c cache.c
Subrata Banikafa39102024-05-18 12:26:40 +000044libc-y += exception.c
Raul E Rangel370c1162018-08-20 12:54:58 -060045libc-y += delay.c
Subrata Banikafa39102024-05-18 12:26:40 +000046libc-$(CONFIG_LP_ARCH_X86_32) += exec.c
47libc-$(CONFIG_LP_ARCH_X86_32) += exec.S
48libc-$(CONFIG_LP_ARCH_X86_32) += exception_asm.S
49libc-$(CONFIG_LP_ARCH_X86_64) += exception_asm_64.S
Stefan Reinauer99c08562008-08-19 17:49:53 +000050
Julius Werner22adcd62014-06-11 14:16:35 -070051# Will fall back to default_memXXX() in libc/memory.c if GPL not allowed.
52libc-$(CONFIG_LP_GPL) += string.c
53
Julius Werner50a81742014-05-15 11:57:38 -070054libgdb-y += gdb.c
Julius Werner22adcd62014-06-11 14:16:35 -070055
Nico Huber4fa9f2a2022-02-22 02:06:51 +010056libcbfs-$(CONFIG_LP_CBFS) += boot_media.c
Hung-Te Lind01d0362013-01-25 12:42:40 +080057
Jordan Crouse20c9cf12008-10-20 16:51:43 +000058# Multiboot support is configurable
Gabe Black1ee2c6d2013-08-09 04:27:35 -070059libc-$(CONFIG_LP_MULTIBOOT) += multiboot.c
Raul E Rangelac8ebd02018-08-20 11:14:44 -060060
61libc-$(CONFIG_LP_ENABLE_APIC) += apic.c