| 1 |
# SPDX-License-Identifier: GPL-2.0 |
| 2 |
# Copyright (C) 2023 ARM Limited |
| 3 |
# |
| 4 |
# In order to avoid interaction with the toolchain and dynamic linker the |
| 5 |
# portions of these tests that interact with the GCS are implemented using |
| 6 |
# nolibc. |
| 7 |
# |
| 8 |
|
| 9 |
TEST_GEN_PROGS := basic-gcs libc-gcs gcs-locking gcs-stress gcspushm gcsstr |
| 10 |
TEST_GEN_PROGS_EXTENDED := gcs-stress-thread |
| 11 |
|
| 12 |
LDLIBS+=-lpthread |
| 13 |
|
| 14 |
include ../../lib.mk |
| 15 |
|
| 16 |
$(OUTPUT)/basic-gcs: basic-gcs.c |
| 17 |
$(CC) $(CFLAGS) -fno-asynchronous-unwind-tables -fno-ident -s -nostdlib -nostdinc \ |
| 18 |
-static -I../../../../include/nolibc -include ../../../../include/nolibc/nolibc.h \ |
| 19 |
-I../../../../../usr/include \ |
| 20 |
-std=gnu99 -I../.. -g \ |
| 21 |
-ffreestanding $^ -o $@ -lgcc |
| 22 |
|
| 23 |
$(OUTPUT)/gcs-stress-thread: gcs-stress-thread.S |
| 24 |
$(CC) -nostdlib $^ -o $@ |
| 25 |
|
| 26 |
$(OUTPUT)/gcspushm: gcspushm.S |
| 27 |
$(CC) -nostdlib $^ -o $@ |
| 28 |
|
| 29 |
$(OUTPUT)/gcsstr: gcsstr.S |
| 30 |
$(CC) -nostdlib $^ -o $@ |