]> git.ipfire.org Git - thirdparty/glibc.git/blame - Makeconfig
nptl: Fix tst-cancel30 on kernels without ppoll_time64 support
[thirdparty/glibc.git] / Makeconfig
CommitLineData
dff8da6b 1# Copyright (C) 1991-2024 Free Software Foundation, Inc.
72e4a717 2# Copyright The GNU Toolchain Authors.
28f540f4
RM
3# This file is part of the GNU C Library.
4
5# The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
6# modify it under the terms of the GNU Lesser General Public
7# License as published by the Free Software Foundation; either
8# version 2.1 of the License, or (at your option) any later version.
28f540f4
RM
9
10# The GNU C Library is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 13# Lesser General Public License for more details.
28f540f4 14
41bdb6e2 15# You should have received a copy of the GNU Lesser General Public
59ba27a6 16# License along with the GNU C Library; if not, see
5a82c748 17# <https://www.gnu.org/licenses/>.
28f540f4
RM
18
19#
20# Makefile configuration options for the GNU C library.
21#
22ifneq (,)
23This makefile requires GNU Make.
24endif
25
3e5f5557
UD
26all: # Make this the default goal
27
28f540f4
RM
28ifneq "$(origin +included-Makeconfig)" "file"
29
30+included-Makeconfig := yes
31
32ifdef subdir
33.. := ../
34endif
35
094bacdb 36# $(common-objdir) is the place to put objects and
28f540f4
RM
37# such that are not specific to a single subdir.
38ifdef objdir
6e953631
UD
39objpfx := $(patsubst %//,%/,$(objdir)/$(subdir)/)
40common-objpfx = $(objdir)/
28f540f4
RM
41common-objdir = $(objdir)
42else
9207e30d 43$(error objdir must be defined by the build-directory Makefile)
28f540f4
RM
44endif
45
2d7ed98a
ST
46# Did we request 'make -s' run? "yes" or "no".
47# Starting from make-4.4 MAKEFLAGS now contains long
48# options like '--shuffle'. To detect presence of 's'
49# we pick first word with short options. Long options
50# are guaranteed to come after whitespace. We use '-'
51# prefix to always have a word before long options
52# even if no short options were passed.
53# Typical MAKEFLAGS values to watch for:
54# "rs --shuffle=42" (silent)
55# " --shuffle" (not silent)
56ifeq ($(findstring s, $(firstword -$(MAKEFLAGS))),)
57silent-make := no
58else
59silent-make := yes
60endif
61
f332db02
RM
62# Root of the sysdeps tree.
63sysdep_dir := $(..)sysdeps
64export sysdep_dir := $(sysdep_dir)
65
28f540f4
RM
66# Get the values defined by options to `configure'.
67include $(common-objpfx)config.make
68
e07bb02a 69# What flags to give to sources which call user provided callbacks
56ab3869 70uses-callbacks = -fexceptions
e07bb02a 71
a4db3439
UD
72# What flags to give to tests which test stack alignment
73stack-align-test-flags =
74
57ba7bb4 75# Complete path to sysdep dirs.
e0a3ed4f
RM
76# `configure' writes a definition of `config-sysdirs' in `config.make'.
77sysdirs := $(foreach D,$(config-sysdirs),$(firstword $(filter /%,$D) $(..)$D))
78
644d3857 79+sysdep_dirs = $(sysdirs)
e0a3ed4f
RM
80ifdef objdir
81+sysdep_dirs := $(objdir) $(+sysdep_dirs)
82endif
57ba7bb4 83
273d56ce
RM
84# Run config.status to update config.make and config.h. We don't show the
85# dependence of config.h to Make, because it is only touched when it
86# changes and so config.status would be run every time; the dependence of
87# config.make should suffice to force regeneration and re-exec, and the new
88# image will notice if config.h changed.
19361cb7
UD
89$(common-objpfx)config.make: $(common-objpfx)config.status \
90 $(..)config.make.in $(..)config.h.in
273d56ce
RM
91 cd $(<D); $(SHELL) $(<F)
92
644d3857
JM
93# Find all the sysdeps configure fragments, to make sure we re-run
94# configure when any of them changes.
5290baf0 95$(common-objpfx)config.status: $(..)version.h $(..)configure \
e0a3ed4f
RM
96 $(foreach dir,$(sysdirs),\
97 $(wildcard $(dir)/Implies) \
95afbbe5 98 $(patsubst %.ac,%,\
f332db02 99 $(firstword $(wildcard \
cb8a6dbd 100 $(addprefix $(dir)/,configure configure.ac))))) \
95afbbe5 101 $(patsubst %.ac,%,\
644d3857 102 $(wildcard $(..)sysdeps/*/preconfigure $(..)sysdeps/*/preconfigure.ac))
273d56ce
RM
103 @cd $(@D); if test -f $(@F); then exec $(SHELL) $(@F) --recheck; else \
104 echo The GNU C library has not been configured. >&2; \
105 echo Run \`configure\' to configure it before building. >&2; \
106 echo Try \`configure --help\' for more details. >&2; \
107 exit 1; fi
28f540f4 108
74015205
UD
109# We don't want CPPFLAGS to be exported to the command running configure.
110unexport CPPFLAGS
111
28f540f4
RM
112# Get the user's configuration parameters.
113ifneq ($(wildcard $(..)configparms),)
114include $(..)configparms
115endif
116ifneq ($(objpfx),)
6e953631
UD
117ifneq ($(wildcard $(common-objpfx)configparms),)
118include $(common-objpfx)configparms
28f540f4
RM
119endif
120endif
28f540f4
RM
121\f
122####
123#### These are the configuration variables. You can define values for
124#### the variables below in the file `configparms'.
125#### Do NOT edit this file.
126####
127
128
129# Common prefix for machine-independent installation directories.
487253ea 130ifeq ($(origin prefix),undefined) # ifndef would override explicit empty value.
28f540f4
RM
131prefix = /usr/local
132endif
133
0413b54c
UD
134# Decide whether we shall build the programs or not. We always do this
135# unless the user tells us (in configparms) or we are building for a
136# standalone target.
137ifndef build-programs
138ifneq ($(config-os),none)
139build-programs=yes
140else
141build-programs=no
142endif
143endif
144
28f540f4 145# Common prefix for machine-dependent installation directories.
487253ea 146ifeq ($(origin exec_prefix),undefined)
28f540f4
RM
147exec_prefix = $(prefix)
148endif
149
150# Where to install the library and object files.
151ifndef libdir
152libdir = $(exec_prefix)/lib
153endif
8d57beea 154inst_libdir = $(install_root)$(libdir)
28f540f4 155
aaa8cb4b 156# Where to install the shared library.
094bacdb
RM
157ifndef slibdir
158slibdir = $(exec_prefix)/lib
159endif
8d57beea 160inst_slibdir = $(install_root)$(slibdir)
094bacdb 161
aaa8cb4b
AS
162# Where to install the dynamic linker.
163ifndef rtlddir
164rtlddir = $(slibdir)
165endif
166inst_rtlddir = $(install_root)$(rtlddir)
167
28f540f4
RM
168# Prefix to put on files installed in $(libdir). For libraries `libNAME.a',
169# the prefix is spliced between `lib' and the name, so the linker switch
170# `-l$(libprefix)NAME' finds the library; for other files the prefix is
171# just prepended to the whole file name.
487253ea 172ifeq ($(origin libprefix),undefined)
28f540f4
RM
173libprefix =
174endif
175
176# Where to install the header files.
177ifndef includedir
25c751d0 178includedir = $(prefix)/include
28f540f4 179endif
8d57beea 180inst_includedir = $(install_root)$(includedir)
28f540f4 181
28f540f4 182# Where to install machine-independent data files.
a2fe9c76 183# These are the timezone database, and the locale database.
28f540f4
RM
184ifndef datadir
185datadir = $(prefix)/share
186endif
8d57beea 187inst_datadir = $(install_root)$(datadir)
28f540f4
RM
188
189# Where to install the timezone data files (which are machine-independent).
190ifndef zonedir
191zonedir = $(datadir)/zoneinfo
192endif
8d57beea 193inst_zonedir = $(install_root)$(zonedir)
28f540f4 194
90fe682d
CD
195# Where to install the compiled binary locale archive and compiled
196# binary locale files.
197ifndef complocaledir
198complocaledir = $(libdir)/locale
a2fe9c76 199endif
90fe682d 200inst_complocaledir = $(install_root)$(complocaledir)
a2fe9c76 201
4a33c2f5
UD
202# Where to install the message catalog data files (which are
203# machine-independent).
314f6dee
CD
204ifndef localedir
205localedir = $(datadir)/locale
4a33c2f5 206endif
314f6dee 207inst_localedir = $(install_root)$(localedir)
4a33c2f5 208
3ec41e03 209# Where to install the locale charmap source files.
19bc17a9
RM
210ifndef i18ndir
211i18ndir = $(datadir)/i18n
a2fe9c76 212endif
8d57beea 213inst_i18ndir = $(install_root)$(i18ndir)
a2fe9c76 214
6973fc01
UD
215# Where to install the shared object for charset transformation.
216ifndef gconvdir
217gconvdir = $(libdir)/gconv
218endif
219inst_gconvdir = $(install_root)$(gconvdir)
220
28f540f4
RM
221# Where to install programs.
222ifndef bindir
223bindir = $(exec_prefix)/bin
224endif
8d57beea 225inst_bindir = $(install_root)$(bindir)
28f540f4 226
7f0ff1b0
UD
227# Where to install internal programs.
228ifndef libexecdir
229libexecdir = $(exec_prefix)/libexec
230endif
231inst_libexecdir = $(install_root)$(libexecdir)
232
28f540f4 233# Where to install administrative programs.
1ef32c3d
UD
234ifndef rootsbindir
235rootsbindir = $(exec_prefix)/sbin
236endif
8d57beea 237inst_rootsbindir = $(install_root)$(rootsbindir)
1ef32c3d 238
28f540f4
RM
239ifndef sbindir
240sbindir = $(exec_prefix)/sbin
241endif
8d57beea 242inst_sbindir = $(install_root)$(sbindir)
28f540f4
RM
243
244# Where to install the Info files.
245ifndef infodir
246infodir = $(prefix)/info
247endif
8d57beea 248inst_infodir = $(install_root)$(infodir)
28f540f4 249
a9171047
UD
250# Where to install audit libraries.
251ifndef auditdir
252auditdir = $(libdir)/audit
253endif
254inst_auditdir = $(install_root)$(auditdir)
255
28f540f4
RM
256# Where to install default configuration files. These include the local
257# timezone specification and network data base files.
258ifndef sysconfdir
259sysconfdir = $(prefix)/etc
260endif
8d57beea 261inst_sysconfdir = $(install_root)$(sysconfdir)
28f540f4 262
77fb9117
UD
263# Directory for the database files and Makefile for nss_db.
264ifndef vardbdir
4248b1b1 265vardbdir = $(localstatedir)/db
77fb9117
UD
266endif
267inst_vardbdir = $(install_root)$(vardbdir)
268
28f540f4
RM
269# Where to install the "localtime" timezone file; this is the file whose
270# contents $(localtime) specifies. If this is a relative pathname, it is
271# relative to $(zonedir). It is a good idea to put this somewhere
272# other than there, so the zoneinfo directory contains only universal data,
273# localizing the configuration data elsewhere.
274ifndef localtime-file
0d8733c4 275localtime-file = $(sysconfdir)/localtime
28f540f4
RM
276endif
277
59dd8641
RM
278# What to use for leap second specifications in compiling the default
279# timezone files. Set this to `/dev/null' for no leap second handling as
280# 1003.1 requires, or to `leapseconds' for proper leap second handling.
281# Both zone flavors are always available as `posix/ZONE' and `right/ZONE'.
282# This variable determines the default: if it's `/dev/null',
283# ZONE==posix/ZONE; if it's `leapseconds', ZONE==right/ZONE.
284ifndef leapseconds
285leapseconds = /dev/null
286endif
287
28f540f4
RM
288# What timezone's DST rules should be used when a POSIX-style TZ
289# environment variable doesn't specify any rules. For 1003.1 compliance
290# this timezone must use rules that are as U.S. federal law defines DST.
291# Run `make -C time echo-zonenames' to see a list of available zone names.
292# This setting can be changed with `zic -p TIMEZONE' at any time.
293# If you want POSIX.1 compatibility, use `America/New_York'.
294ifndef posixrules
295posixrules = America/New_York
296endif
297
298# Where to install the "posixrules" timezone file; this is file
299# whose contents $(posixrules) specifies. If this is a relative
300# pathname, it is relative to $(zonedir).
301ifndef posixrules-file
302posixrules-file = posixrules
303endif
304
305
306# Directory where your system's native header files live.
307# This is used on Unix systems to generate some GNU libc header files.
308ifndef sysincludedir
309sysincludedir = /usr/include
310endif
311
312
313# Commands to install files.
314ifndef INSTALL_DATA
315INSTALL_DATA = $(INSTALL) -m 644
316endif
07627f49
UD
317ifndef INSTALL_SCRIPT
318INSTALL_SCRIPT = $(INSTALL)
319endif
28f540f4
RM
320ifndef INSTALL_PROGRAM
321INSTALL_PROGRAM = $(INSTALL)
322endif
323ifndef INSTALL
324INSTALL = install
325endif
326
327
328# The name of the C compiler.
329# If you've got GCC, and it works, use it.
330ifeq ($(origin CC),default)
331CC := gcc
332endif
333
334# The name of the C compiler to use for compilations of programs to run on
335# the host that is building the library. If you set CC to a
336# cross-compiler, you must set this to the normal compiler.
337ifndef BUILD_CC
338BUILD_CC = $(CC)
339endif
340
341# Default flags to pass the C compiler.
342ifndef default_cflags
1d5c2feb
UD
343ifeq ($(release),stable)
344default_cflags := -g -O2
345else
a8922de8 346default_cflags := -g -O
28f540f4 347endif
1d5c2feb 348endif
28f540f4
RM
349
350# Flags to pass the C compiler when assembling preprocessed assembly code
e4f5eae8 351# (`.S' files).
28f540f4
RM
352ifndef asm-CPPFLAGS
353asm-CPPFLAGS =
354endif
355
3ce1f295
UD
356# Must be supported by the linker.
357no-whole-archive = -Wl,--no-whole-archive
358whole-archive = -Wl,--whole-archive
359
779ae82e 360# Installed name of the startup code.
26ecc33a 361# The ELF convention is that the startfile is called crt1.o
779ae82e 362start-installed-name = crt1.o
af09bfb5
RM
363# On systems that do not need a special startfile for statically linked
364# binaries, simply set it to the normal name.
365ifndef static-start-installed-name
366static-start-installed-name = $(start-installed-name)
367endif
779ae82e 368
9d7a3741
L
369ifeq (yes,$(enable-static-pie))
370# Link with rcrt1.o, instead of crt1.o, to call _dl_relocate_static_pie
371# to relocate static PIE.
372real-static-start-installed-name = r$(static-start-installed-name)
373else
374real-static-start-installed-name = $(static-start-installed-name)
375endif
376
1c563add
UD
377relro-LDFLAGS = -Wl,-z,relro
378LDFLAGS.so += $(relro-LDFLAGS)
379LDFLAGS-rtld += $(relro-LDFLAGS)
1c563add 380
2d5ec669
L
381# Linker options to enable and disable DT_RELR.
382ifeq ($(have-dt-relr),yes)
383dt-relr-ldflag = -Wl,-z,pack-relative-relocs
384no-dt-relr-ldflag = -Wl,-z,nopack-relative-relocs
385else
386dt-relr-ldflag =
387no-dt-relr-ldflag =
388endif
389
23645707
SP
390ifeq (no,$(build-pie-default))
391pie-default = $(no-pie-ccflag)
392else # build-pie-default
9d7a3741
L
393pic-default = -DPIC
394# Compile libc.a and libc_p.a with -fPIE/-fpie for static PIE.
395pie-default = $(pie-ccflag)
23645707
SP
396
397ifeq (yes,$(enable-static-pie))
2d5ec669 398static-pie-dt-relr-ldflag = $(dt-relr-ldflag)
9d7a3741 399ifeq (yes,$(have-static-pie))
23645707 400static-pie-ldflag = -static-pie
9d7a3741
L
401else
402# Static PIE can't have dynamic relocations in read-only segments since
403# static PIE is mapped into memory by kernel. --eh-frame-hdr is needed
404# for PIE to support exception.
23645707
SP
405static-pie-ldflag = -Wl,-pie,--no-dynamic-linker,--eh-frame-hdr,-z,text
406endif # have-static-pie
407endif # enable-static-pie
408endif # build-pie-default
9d7a3741 409
2d6ab5df
FW
410# If lazy relocations are disabled, add the -z now flag. Use
411# LDFLAGS-lib.so instead of LDFLAGS.so, to avoid adding the flag to
412# test modules.
413ifeq ($(bind-now),yes)
414LDFLAGS-lib.so += -Wl,-z,now
94a4e9e4
FW
415# Extra flags for dynamically linked non-test main programs.
416link-extra-flags += -Wl,-z,now
2d6ab5df
FW
417endif
418
04f5a636
RM
419# Command to run after every final link (executable or shared object).
420# This is invoked with $(call after-link,...), so it should operate on
421# the file $1. This can be set to do some sort of post-processing on
422# binaries, or to perform some sort of static sanity check.
423ifndef after-link
424after-link =
425endif
426
c23de0aa
FW
427# Additional libraries to link into every test.
428link-extra-libs-tests = $(libsupport)
429
435aa54b
L
430# Command for linking PIE programs with the C library.
431ifndef +link-pie
f3eef963 432+link-pie-before-inputs = $(if $($(@F)-no-pie),$(no-pie-ldflag),-pie) \
2d5ec669 433 $(if $($(@F)-no-dt-relr),$(no-dt-relr-ldflag),$(dt-relr-ldflag)) \
f3eef963 434 -Wl,-O1 -nostdlib -nostartfiles \
740b3dbe 435 $(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
3ee318c9 436 $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \
34d6a3cb 437 $(firstword $(CRT-$(@F)) $(csu-objpfx)S$(start-installed-name)) \
f3eef963
JM
438 $(+preinit) $(+prectorS)
439+link-pie-before-libc = -o $@ $(+link-pie-before-inputs) \
435aa54b 440 $(filter-out $(addprefix $(csu-objpfx),start.o \
da62f81b
AS
441 S$(start-installed-name))\
442 $(+preinit) $(link-extra-libs) \
443 $(common-objpfx)libc% $(+postinit),$^) \
740b3dbe
L
444 $(link-extra-libs)
445+link-pie-after-libc = $(+postctorS) $(+postinit)
04f5a636 446define +link-pie
a8ff215e
FW
447$(CC) $(link-libc-rpath-link) $(+link-pie-before-libc) $(rtld-LDFLAGS) \
448 $(link-extra-flags) $(link-libc) $(+link-pie-after-libc)
04f5a636
RM
449$(call after-link,$@)
450endef
451define +link-pie-tests
e30fb31c
FW
452$(CC) $(+link-pie-before-libc) $(rtld-tests-LDFLAGS) $(link-libc-tests) \
453 $(+link-pie-after-libc)
04f5a636
RM
454$(call after-link,$@)
455endef
23b5cae1 456define +link-pie-printers-tests
e30fb31c
FW
457$(CC) $(+link-pie-before-libc) $(built-rtld-LDFLAGS) \
458 $(link-libc-printers-tests) $(+link-pie-after-libc)
23b5cae1
MG
459$(call after-link,$@)
460endef
435aa54b 461endif
e1586792
UD
462# Command for statically linking programs with the C library.
463ifndef +link-static
f3eef963 464+link-static-before-inputs = -nostdlib -nostartfiles -static \
23645707 465 $(if $($(@F)-no-pie),$(no-pie-ldflag),$(static-pie-ldflag)) \
2d5ec669 466 $(if $($(@F)-no-dt-relr),$(no-dt-relr-ldflag),$(static-pie-dt-relr-ldflag)) \
9f0d7b6d 467 $(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
9d7a3741 468 $(firstword $(CRT-$(@F)) $(csu-objpfx)$(real-static-start-installed-name)) \
f3eef963
JM
469 $(+preinit) $(+prectorT)
470+link-static-before-libc = -o $@ $(+link-static-before-inputs) \
e1586792
UD
471 $(filter-out $(addprefix $(csu-objpfx),start.o \
472 $(start-installed-name))\
473 $(+preinit) $(link-extra-libs-static) \
474 $(common-objpfx)libc% $(+postinit),$^) \
d173d12e 475 $(link-extra-libs-static)
a5055ad1 476+link-static-after-libc = $(+postctorT) $(+postinit)
04f5a636 477define +link-static
e30fb31c
FW
478$(CC) $(+link-static-before-libc) $(link-extra-flags) $(link-libc-static) \
479 $(+link-static-after-libc)
04f5a636
RM
480$(call after-link,$@)
481endef
482define +link-static-tests
e30fb31c
FW
483$(CC) $(+link-static-before-libc) $(link-libc-static-tests) \
484 $(+link-static-after-libc)
04f5a636
RM
485$(call after-link,$@)
486endef
e1586792 487endif
94b32c39
L
488# Commands for linking programs with the C library.
489ifndef +link
490ifeq (yes,$(build-shared))
00c714df 491ifeq (yes,$(cc-pie-default))
cc08749b 492no-pie-ldflag = -no-pie
00c714df
L
493endif
494ifeq (yes,$(build-pie-default))
cc08749b
L
495+link = $(+link-pie)
496+link-tests = $(+link-pie-tests)
f3eef963
JM
497+link-tests-before-inputs = $(+link-pie-before-inputs) $(rtld-tests-LDFLAGS)
498+link-tests-after-inputs = $(link-libc-tests) $(+link-pie-after-libc)
23b5cae1
MG
499+link-printers-tests = $(+link-pie-printers-tests)
500else # not build-pie-default
23645707 501+link-before-inputs = -nostdlib -nostartfiles $(no-pie-ldflag) \
740b3dbe 502 $(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
3ee318c9 503 $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \
6014c65d 504 $(firstword $(CRT-$(@F)) $(csu-objpfx)$(start-installed-name)) \
f3eef963
JM
505 $(+preinit) $(+prector)
506+link-before-libc = -o $@ $(+link-before-inputs) \
94b32c39
L
507 $(filter-out $(addprefix $(csu-objpfx),start.o \
508 $(start-installed-name))\
509 $(+preinit) $(link-extra-libs) \
510 $(common-objpfx)libc% $(+postinit),$^) \
511 $(link-extra-libs)
512+link-after-libc = $(+postctor) $(+postinit)
04f5a636 513define +link
a8ff215e
FW
514$(CC) $(link-libc-rpath-link) $(+link-before-libc) $(rtld-LDFLAGS) \
515 $(link-extra-flags) $(link-libc) $(+link-after-libc)
04f5a636
RM
516$(call after-link,$@)
517endef
f3eef963
JM
518+link-tests-before-inputs = $(+link-before-inputs) $(rtld-tests-LDFLAGS)
519+link-tests-after-inputs = $(link-libc-tests) $(+link-after-libc)
04f5a636 520define +link-tests
e30fb31c 521$(CC) $(+link-before-libc) $(rtld-tests-LDFLAGS) $(link-libc-tests) \
76dcbf42 522 $(+link-after-libc)
04f5a636
RM
523$(call after-link,$@)
524endef
23b5cae1 525define +link-printers-tests
e30fb31c 526$(CC) $(+link-before-libc) $(built-rtld-LDFLAGS) $(link-libc-printers-tests) \
23b5cae1
MG
527 $(+link-after-libc)
528$(call after-link,$@)
529endef
530endif # build-pie-default
531else # build-static
94b32c39
L
532+link = $(+link-static)
533+link-tests = $(+link-static-tests)
f3eef963
JM
534+link-tests-before-inputs = $(+link-static-before-inputs)
535+link-tests-after-inputs = $(link-libc-static-tests) $(+link-static-after-libc)
23b5cae1
MG
536+link-printers-tests = $(+link-static-tests)
537endif # build-shared
538endif # +link
539
540# The pretty printer test programs need to be compiled without optimizations
541# so they won't confuse gdb. We could use either the 'GCC optimize' pragma
542# or the 'optimize' function attribute to achieve this; however, at least on
543# ARM, gcc always produces different debugging symbols when invoked with
544# a -O greater than 0 than when invoked with -O0, regardless of anything else
545# we're using to suppress optimizations. Therefore, we need to explicitly pass
64d9580c
FB
546# -O0 to it through CFLAGS. As a result, any fortification needs to be disabled
547# as it needs -O greater than 0.
23b5cae1
MG
548# Additionally, the build system will try to -include $(common-objpfx)/config.h
549# when compiling the tests, which will throw an error if some special macros
550# (such as __OPTIMIZE__ and IS_IN_build) aren't defined. To avoid this, we
551# tell gcc to define IS_IN_build.
64d9580c 552CFLAGS-printers-tests := -O0 -ggdb3 -DIS_IN_build $(no-fortify-source)
23b5cae1 553
0269750c 554ifeq (yes,$(build-shared))
23b5cae1
MG
555# These indicate whether to link using the built ld.so or the installed one.
556installed-rtld-LDFLAGS = -Wl,-dynamic-linker=$(rtlddir)/$(rtld-installed-name)
557built-rtld-LDFLAGS = -Wl,-dynamic-linker=$(elf-objpfx)ld.so
558
740b3dbe 559ifndef rtld-LDFLAGS
23b5cae1 560rtld-LDFLAGS = $(installed-rtld-LDFLAGS)
740b3dbe 561endif
23b5cae1 562
740b3dbe
L
563ifndef rtld-tests-LDFLAGS
564ifeq (yes,$(build-hardcoded-path-in-tests))
23b5cae1 565rtld-tests-LDFLAGS = $(built-rtld-LDFLAGS)
740b3dbe 566else
23b5cae1
MG
567rtld-tests-LDFLAGS = $(installed-rtld-LDFLAGS)
568endif # build-hardcoded-path-in-tests
569endif # rtld-tests-LDFLAGS
570
571endif # build-shared
572
3fe9de0d
RM
573ifndef link-libc
574ifeq (yes,$(build-shared))
aa1075ea
RM
575# We need the versioned name of libc.so in the deps of $(others) et al
576# so that the symlink to libc.so is created before anything tries to
577# run the linked programs.
23b5cae1 578link-libc-rpath = -Wl,-rpath=$(rpath-link)
740b3dbe 579link-libc-rpath-link = -Wl,-rpath-link=$(rpath-link)
23b5cae1 580
a8ff215e
FW
581# For programs which are not tests, $(link-libc-rpath-link) is added
582# directly in $(+link), $(+link-pie) above, so that -Wl,-rpath-link
583# comes before the expansion of LDLIBS-* and affects libraries added
584# there. For shared objects, -Wl,-rpath-link is added via
585# $(build-shlib-helper) and $(build-module-helper) in Makerules (also
586# before the expansion of LDLIBS-* variables).
587
588# Tests use -Wl,-rpath instead of -Wl,-rpath-link for
589# build-hardcoded-path-in-tests.
740b3dbe 590ifeq (yes,$(build-hardcoded-path-in-tests))
23b5cae1 591link-libc-tests-rpath-link = $(link-libc-rpath)
114d07fd 592link-test-modules-rpath-link = $(link-libc-rpath)
740b3dbe
L
593else
594link-libc-tests-rpath-link = $(link-libc-rpath-link)
114d07fd 595link-test-modules-rpath-link =
23b5cae1
MG
596endif # build-hardcoded-path-in-tests
597
3618e5fe
PM
598link-libc-between-gnulib = $(common-objpfx)libc.so$(libc.so-version) \
599 $(common-objpfx)$(patsubst %,$(libtype.oS),c) \
600 -Wl,--as-needed $(elf-objpfx)ld.so \
601 -Wl,--no-as-needed
602link-libc = $(link-libc-between-gnulib) $(gnulib)
23b5cae1 603
3618e5fe 604link-libc-tests-after-rpath-link = $(gnulib-tests) $(link-libc-between-gnulib) $(gnulib-tests)
740b3dbe 605link-libc-tests = $(link-libc-tests-rpath-link) \
23b5cae1
MG
606 $(link-libc-tests-after-rpath-link)
607# Pretty printer test programs always require rpath instead of rpath-link.
608link-libc-printers-tests = $(link-libc-rpath) \
609 $(link-libc-tests-after-rpath-link)
610
4d6acc61 611# This is how to find at build-time things that will be installed there.
e69d994a 612rpath-dirs = math elf dlfcn nss nis rt resolv mathvec support
e72bfd87
UD
613rpath-link = \
614$(common-objdir):$(subst $(empty) ,:,$(patsubst ../$(subdir),.,$(rpath-dirs:%=$(common-objpfx)%)))
23b5cae1 615else # build-static
4ac5087b 616link-libc = $(common-objpfx)libc.a $(otherlibs) $(gnulib) $(common-objpfx)libc.a $(gnulib)
95f5a9a8 617link-libc-tests = $(common-objpfx)libc.a $(otherlibs) $(gnulib-tests) $(common-objpfx)libc.a $(gnulib-tests)
23b5cae1
MG
618endif # build-shared
619endif # link-libc
900bec85 620
ad10cac8 621# Differences in the linkers on the various platforms.
ad10cac8
UD
622LDFLAGS-rpath-ORIGIN = -Wl,-rpath,'$$ORIGIN'
623LDFLAGS-soname-fname = -Wl,-soname,$(@F)
624LDFLAGS-rdynamic = -rdynamic
625LDFLAGS-Bsymbolic = -Bsymbolic
ad10cac8 626
f01010de
UD
627# Choose the default search path for the dynamic linker based on
628# where we will install libraries.
629ifneq ($(libdir),$(slibdir))
630default-rpath = $(slibdir):$(libdir)
631else
632default-rpath = $(libdir)
633endif
634
57ba7bb4 635ifndef link-extra-libs
1d038b6b
RM
636link-extra-libs = $(LDLIBS-$(@F))
637link-extra-libs-static = $(link-extra-libs)
57ba7bb4 638endif
e1586792
UD
639
640# The static libraries.
b9af1301 641link-libc-static = -Wl,--start-group $(common-objpfx)libc.a $(static-gnulib) -Wl,--end-group
95f5a9a8 642link-libc-static-tests = -Wl,--start-group $(common-objpfx)libc.a $(static-gnulib-tests) -Wl,--end-group
e1586792 643
95f5a9a8
JM
644# How to link against libgcc. Some libgcc functions, such as those
645# for "long long" arithmetic or software floating point, can always be
646# built without use of C library headers and do not have any global
647# state so can safely be linked statically into any executable or
648# shared library requiring them; these functions are in libgcc.a.
649# Other functions, relating to exception handling, may require C
650# library headers to build and it may not be safe to have more than
651# one copy of them in a process; these functions are only in
652# libgcc_s.so and libgcc_eh.a.
653#
654# To avoid circular dependencies when bootstrapping, it is desirable
655# to avoid use of libgcc_s and libgcc_eh in building glibc. Where any
656# glibc functionality (in particular, thread cancellation) requires
657# exception handling, this is implemented through dlopen of libgcc_s
658# to avoid unnecessary dependencies on libgcc_s by programs not using
659# that functionality; executables built with glibc do not use
660# exception handling other than through thread cancellation.
661#
662# Undefined references to functions from libgcc_eh or libgcc_s may
663# arise for code built with -fexceptions. In the case of statically
664# linked programs installed by glibc, unwinding will never actually
665# occur at runtime and the use of elf/static-stubs.c to resolve these
666# references is safe. In the case of statically linked test programs
667# and test programs built with -fexceptions, unwinding may occur in
668# some cases and it is preferable to link with libgcc_eh or libgcc_s
669# so that the testing is as similar as possible to how programs will
670# be built with the installed glibc.
671#
672# Some architectures have architecture-specific systems for exception
673# handling that may involve undefined references to
674# architecture-specific functions. On those architectures,
675# gnulib-arch and static-gnulib-arch may be defined in sysdeps
676# makefiles to use additional libraries for linking executables and
677# shared libraries built by glibc.
28f540f4 678ifndef gnulib
cbdb12de
UD
679ifneq ($(have-cc-with-libunwind),yes)
680 libunwind =
feca5e0b 681else
cbdb12de 682 libunwind = -lunwind
feca5e0b 683endif
a3cc4f48 684libgcc_eh := -Wl,--as-needed -lgcc_s $(libunwind) -Wl,--no-as-needed
95f5a9a8
JM
685gnulib-arch =
686gnulib = -lgcc $(gnulib-arch)
687gnulib-tests := -lgcc $(libgcc_eh)
688static-gnulib-arch =
94b32c39
L
689# By default, elf/static-stubs.o, instead of -lgcc_eh, is used to
690# statically link programs. When --disable-shared is used, we use
691# -lgcc_eh since elf/static-stubs.o isn't sufficient.
692ifeq (yes,$(build-shared))
95f5a9a8 693static-gnulib = -lgcc $(static-gnulib-arch)
94b32c39
L
694else
695static-gnulib = -lgcc -lgcc_eh $(static-gnulib-arch)
696endif
95f5a9a8 697static-gnulib-tests := -lgcc -lgcc_eh $(libunwind)
cbdb12de 698libc.so-gnulib := -lgcc
28f540f4 699endif
e75154a6
RM
700+preinit = $(addprefix $(csu-objpfx),crti.o)
701+postinit = $(addprefix $(csu-objpfx),crtn.o)
35e65999
RA
702+prector = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtbegin.o`
703+postctor = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtend.o`
435aa54b 704# Variants of the two previous definitions for linking PIE programs.
35e65999
RA
705+prectorS = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtbeginS.o`
706+postctorS = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtendS.o`
a5055ad1 707# Variants of the two previous definitions for statically linking programs.
727aacfd
L
708static-prector = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtbeginT.o`
709static-postctor = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtend.o`
9d7a3741
L
710ifeq (yes,$(enable-static-pie))
711# Static PIE must use PIE variants.
727aacfd
L
712+prectorT = $(if $($(@F)-no-pie),$(static-prector),$(+prectorS))
713+postctorT = $(if $($(@F)-no-pie),$(static-postctor),$(+postctorS))
9d7a3741 714else
727aacfd
L
715+prectorT = $(static-prector)
716+postctorT =$(static-postctor)
9d7a3741 717endif
6e953631
UD
718csu-objpfx = $(common-objpfx)csu/
719elf-objpfx = $(common-objpfx)elf/
28f540f4 720
cc1290d0
JM
721# A command that, prepended to the name and arguments of a program,
722# and run on the build system, causes that program with those
723# arguments to be run on the host for which the library is built.
724ifndef test-wrapper
725test-wrapper =
726endif
727# Likewise, but the name of the program is preceded by
728# <variable>=<value> assignments for environment variables.
729ifndef test-wrapper-env
730test-wrapper-env = $(test-wrapper) env
731endif
9162c01d
RM
732# Likewise, but the program's environment will be empty except for any
733# explicit <variable>=<value> assignments preceding the program name.
734ifndef test-wrapper-env-only
735test-wrapper-env-only = $(test-wrapper) env -i
736endif
cc1290d0 737
03ac099f
JM
738# Whether to run test programs built for the library's host system.
739ifndef run-built-tests
cc1290d0 740ifeq (yes|,$(cross-compiling)|$(test-wrapper))
03ac099f
JM
741run-built-tests = no
742else
743run-built-tests = yes
744endif
745endif
746
d6fe5e58
JM
747# Whether to stop immediately when a test fails. Nonempty means to
748# stop, empty means not to stop.
749ifndef stop-on-test-failure
750stop-on-test-failure =
751endif
752
03a75825
RM
753# How to run a program we just linked with our library.
754# The program binary is assumed to be $(word 2,$^).
755built-program-file = $(dir $(word 2,$^))$(notdir $(word 2,$^))
01dc6df9
SP
756rtld-prefix = $(elf-objpfx)$(rtld-installed-name) \
757 --library-path \
758 $(rpath-link)$(patsubst %,:%,$(sysdep-library-path))
0269750c 759ifeq (yes,$(build-shared))
196980f5 760comma = ,
11336c16
UD
761sysdep-library-path = \
762$(subst $(empty) ,:,$(strip $(patsubst -Wl$(comma)-rpath-link=%, %,\
763 $(filter -Wl$(comma)-rpath-link=%,\
764 $(sysdep-LDFLAGS)))))
88866099
JM
765# $(run-via-rtld-prefix) is a command that, when prepended to the name
766# of a program built with the newly built library, produces a command
767# that, executed on the host for which the library is built, runs that
daaa7713
JM
768# program. For tests listed in tests-static or xtests-static, it is
769# empty.
88866099
JM
770run-via-rtld-prefix = \
771 $(if $(strip $(filter $(notdir $(built-program-file)), \
01dc6df9 772 $(tests-static) $(xtests-static))),, $(rtld-prefix))
8658ceda 773else
88866099
JM
774run-via-rtld-prefix =
775endif
8540f6d2
JM
776# $(run-program-env) is the default environment variable settings to
777# use when running a program built with the newly built library.
778run-program-env = GCONV_PATH=$(common-objpfx)iconvdata \
779 LOCPATH=$(common-objpfx)localedata LC_ALL=C
25fe8932 780# $(run-program-prefix) is a command that, when prepended to the name
88866099
JM
781# of a program built with the newly built library, produces a command
782# that, executed on the build system on which "make" is run, runs that
8540f6d2
JM
783# program. $(run-program-prefix-before-env) and
784# $(run-program-prefix-after-env) are similar, but separate parts
785# before and after a list of environment variables.
786run-program-prefix-before-env = $(test-wrapper-env)
787run-program-prefix-after-env = $(run-via-rtld-prefix)
788run-program-prefix = $(run-program-prefix-before-env) $(run-program-env) \
789 $(run-program-prefix-after-env)
88866099
JM
790# $(built-program-cmd) is a command that, executed on the build system
791# on which "make" is run, runs the newly built program that is the
792# second dependency of the makefile target in which
8540f6d2
JM
793# $(built-program-cmd) is used. $(built-program-cmd-before-env) and
794# $(built-program-cmd-after-env) are similar, before and after a list
795# of environment variables.
796built-program-cmd-before-env = $(test-wrapper-env)
797built-program-cmd-after-env = $(run-via-rtld-prefix) $(built-program-file)
798built-program-cmd = $(built-program-cmd-before-env) $(run-program-env) \
799 $(built-program-cmd-after-env)
166bca24
JB
800# $(host-built-program-cmd) is a command that, executed on the host
801# for which the library is built, runs the newly built program that is
802# the second dependency of the makefile target in which
803# $(host-built-program-cmd) is used.
804host-built-program-cmd = $(run-via-rtld-prefix) $(built-program-file)
3dbbd2ff
ST
805# $(ld-library-path) is the common content to be set in LD_LIBRARY_PATH
806# for running static binaries that may load dynamic objects.
807ld-library-path = $(objpfx):$(common-objpfx)$(addprefix :,$(sysdep-ld-library-path))
03a75825 808
28f540f4
RM
809ifndef LD
810LD := ld -X
811endif
812
740b3dbe
L
813# $(test-via-rtld-prefix) is a command that, when prepended to the name
814# of a test program built with the newly built library, produces a command
815# that, executed on the host for which the library is built, runs that
daaa7713
JM
816# program. For tests listed in tests-static or xtests-static as well
817# as when test programs are hardcoded to the newly built libraries, it
818# is empty.
740b3dbe
L
819
820# $(test-program-prefix) is a command that, when prepended to the name
821# of a test program built with the newly built library, produces a command
822# that, executed on the build system on which "make" is run, runs that
8540f6d2
JM
823# test program. $(test-program-prefix-before-env) and
824# $(test-program-prefix-after-env) are similar, before and after a
825# list of environment variables.
740b3dbe
L
826
827# $(test-program-cmd) is a command that, executed on the build system
828# on which "make" is run, runs the newly built test program that is the
829# second dependency of the makefile target in which
8540f6d2
JM
830# $(test-program-cmd) is used. $(test-program-cmd-before-env) and
831# $(test-program-cmd-after-env) are similar, before and after a list
832# of environment variables.
740b3dbe
L
833
834# $(host-test-program-cmd) is a command that, executed on the host
835# for which the library is built, runs the newly built test program that
836# is the second dependency of the makefile target in which
837# $(host-test-program-cmd) is used.
838
839ifeq (yes,$(build-hardcoded-path-in-tests))
840test-via-rtld-prefix =
8540f6d2
JM
841test-program-prefix-before-env = $(test-wrapper-env)
842test-program-prefix-after-env =
843test-program-prefix = $(test-program-prefix-before-env) $(run-program-env) \
844 $(test-program-prefix-after-env)
845test-program-cmd-before-env = $(test-wrapper-env)
846test-program-cmd-after-env = $(built-program-file)
847test-program-cmd = $(test-program-cmd-before-env) $(run-program-env) \
848 $(test-program-cmd-after-env)
740b3dbe
L
849host-test-program-cmd = $(built-program-file)
850else
851test-via-rtld-prefix = $(run-via-rtld-prefix)
8540f6d2
JM
852test-program-prefix-before-env = $(run-program-prefix-before-env)
853test-program-prefix-after-env = $(run-program-prefix-after-env)
740b3dbe 854test-program-prefix = $(run-program-prefix)
8540f6d2
JM
855test-program-cmd-before-env = $(built-program-cmd-before-env)
856test-program-cmd-after-env = $(built-program-cmd-after-env)
740b3dbe
L
857test-program-cmd = $(built-program-cmd)
858host-test-program-cmd = $(host-built-program-cmd)
859endif
860
28f540f4 861# Extra flags to pass to GCC.
d6fe19fa 862+gccwarn := -Wall -Wwrite-strings -Wundef
a4ecc9eb 863ifeq ($(enable-werror),yes)
48bb14bd 864+gccwarn += -Werror
a4ecc9eb 865endif
8e2f7c68 866+gccwarn-c = -Wstrict-prototypes -Wold-style-definition
28f540f4 867
dec36b4f
UD
868# We do not depend on the address of constants in different files to be
869# actually different, so allow the compiler to merge them all.
870+merge-constants = -fmerge-all-constants
871
29ba805c
AJ
872# We have to assume that glibc functions are called in any rounding
873# mode and also change the rounding mode in a few functions. So,
874# disable any optimization that assume default rounding mode.
875+math-flags = -frounding-math
876
2ef42716
AJ
877# Logically only "libnldbl", "nonlib" and "testsuite" should be using
878# -fno-math-errno. However due to GCC bug #88576, only "libm" can use
879# -fno-math-errno.
880+extra-math-flags = $(if $(filter libm,$(in-module)),-fno-math-errno,-fmath-errno)
1294b189 881
a6d2f948 882# Use 64 bit time_t support for installed programs
36676f5e 883installed-modules = nonlib nscd ldconfig locale_programs \
a6d2f948 884 iconvprogs libnss_files libnss_compat libnss_db libnss_hesiod \
545eefc2 885 libutil libpcprofile libnsl
a6d2f948
AZ
886+extra-time-flags = $(if $(filter $(installed-modules),\
887 $(in-module)),-D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64)
888
cecbc796
NA
889# We might want to compile with some stack-protection flag.
890ifneq ($(stack-protector),)
891+stack-protector=$(stack-protector)
892endif
893
8b8f13b6
SP
894# Some routines are unsafe to build with stack-protection since they're called
895# before the stack check guard is set up. Provide a way to disable stack
896# protector. The first argument is the extension (.o, .os, .oS) and the second
897# is a list of routines that this path should be applied to.
898define elide-stack-protector
899$(if $(filter $(@F),$(patsubst %,%$(1),$(2))), $(no-stack-protector))
900endef
901
64d9580c
FB
902# We might want to compile with fortify-source
903ifneq ($(fortify-source),)
904+fortify-source=$(fortify-source)
905endif
906
907# Some routine can't be fortified like the ones used by fortify
908define elide-fortify-source
909$(if $(filter $(@F),$(patsubst %,%$(1),$(2))), $(no-fortify-source))
910endef
911
28f540f4 912# The program that makes Emacs-style TAGS files.
78759725 913ETAGS := etags
28f540f4 914
9de06f3c
RM
915# The `xgettext' program for producing .pot files from sources.
916ifndef XGETTEXT
917XGETTEXT = xgettext
918endif
919
28f540f4
RM
920# The `m4' macro processor; this is used by sysdeps/sparc/Makefile (and
921# perhaps others) to preprocess assembly code in some cases.
922M4 = m4
923
73237de3
UD
924# To force installation of files even if they are older than the
925# installed files. This variable is included in the dependency list
926# of all installation targets.
927ifeq ($(force-install),yes)
928+force = force-install
929else
930+force =
931endif
932
28f540f4
RM
933####
934#### End of configuration variables.
935####
936\f
937# This tells some versions of GNU make before 3.63 not to export all variables.
938.NOEXPORT:
939
940# We want to echo the commands we're running without
6d52618b 941# umpteen zillion filenames along with it (we use `...' instead)
28f540f4
RM
942# but we don't want this echoing done when the user has said
943# he doesn't want to see commands echoed by using -s.
2d7ed98a 944ifeq ($(silent-make),yes) # if -s
28f540f4
RM
945+cmdecho := echo >/dev/null
946else # not -s
947+cmdecho := echo
948endif # -s
949
950# These are the flags given to the compiler to tell
951# it what sort of optimization and/or debugging output to do.
952ifndef +cflags
953# If `CFLAGS' was defined, use that.
954ifdef CFLAGS
955+cflags := $(filter-out -I%,$(CFLAGS))
956endif # CFLAGS
957endif # +cflags
958
fd26970f 959# If none of the above worked, default to "-g -O".
28f540f4
RM
960ifeq "$(strip $(+cflags))" ""
961+cflags := $(default_cflags)
962endif # $(+cflags) == ""
963
7c241325
FW
964# Force building with -fno-common because hidden_def, compat_symbol
965# and other constructs do not work for common symbols (and would
966# otherwise require specifying __attribute__ ((nocommon)) on a
967# case-by-case basis).
cecbc796 968+cflags += $(cflags-cpu) $(+gccwarn) $(+merge-constants) $(+math-flags) \
7c241325 969 $(+stack-protector) -fno-common
28f540f4 970+gcc-nowarn := -w
28f540f4 971
64d9580c
FB
972# We must filter out elf because the early bootstrap of the dynamic loader
973# cannot be fortified. Likewise we exclude dlfcn because it is entangled
974# with the loader. We must filter out csu because early startup, like the
975# loader, cannot be fortified. Lastly debug is the fortification routines
976# themselves and they cannot be fortified.
977do-fortify = $(filter-out elf dlfcn csu debug,$(subdir))
978ifeq ($(do-fortify),$(subdir))
979+cflags += $(+fortify-source)
980else
981+cflags += $(no-fortify-source)
982endif
983
b84660a8
RM
984# Each sysdeps directory can contain header files that both will be
985# used to compile and will be installed. Each can also contain an
986# include/ subdirectory, whose header files will be used to compile
987# but will not be installed, and will take precedence over the
988# installed files. This mirrors the top-level include/ subdirectory.
989+sysdep-includes := $(foreach dir,$(+sysdep_dirs),\
990 $(addprefix -I,$(wildcard $(dir)/include) $(dir)))
991
b6ab06ce
UD
992# These are flags given to the C compiler to tell it to look for
993# include files (including ones given in angle brackets) in the parent
994# library source directory, in the include directory, and in the
995# current directory.
e0a3ed4f 996+includes = -I$(..)include $(if $(subdir),$(objpfx:%/=-I%)) \
4ae73ca0
RM
997 $(+sysdep-includes) $(includes) \
998 $(patsubst %/,-I%,$(..)) $(libio-include) -I. $(sysincludes)
28f540f4 999
96aa2d94 1000# Since libio has several internal header files, we use a -I instead
762a2918 1001# of many little headers in the include directory.
96aa2d94 1002libio-include = -I$(..)libio
28f540f4 1003
130ac68c 1004# List of non-library modules that we build.
36676f5e 1005built-modules = iconvprogs iconvdata ldconfig libmemusage \
11306df7 1006 libpcprofile librpcsvc locale-programs \
7c3018f9 1007 memusagestat nonlib nscd extramodules libnldbl libsupport \
a6d2f948 1008 testsuite testsuite-internal
130ac68c 1009
9cd47470
SP
1010in-module = $(subst -,_,$(firstword $(libof-$(basename $(@F))) \
1011 $(libof-$(<F)) \
1012 $(libof-$(@F)) \
1013 libc))
1014
e400f3cc
SP
1015# Build ld.so, libc.so and libpthread.so with -ftls-model=initial-exec
1016tls-model = $(if $(filter libpthread rtld \
1017 libc,$(in-module)),-ftls-model=initial-exec,)
1018
130ac68c 1019module-cppflags-real = -include $(common-objpfx)libc-modules.h \
279bc5b3 1020 -DMODULE_NAME=$(in-module)
130ac68c 1021
8a257e2c
RM
1022# We don't need libc-modules.h and the MODULE_NAME definition for .v.i
1023# files. These targets don't (and will likely never need to) use the IS_IN
1024# facility. In fact, shlib-versions should not use it because that will
1025# create a circular dependency as libc-modules.h is generated from
1026# shlib-versions.
6b229222 1027module-cppflags = $(if $(filter %.mk.i %.v.i,$(@F)),,$(module-cppflags-real))
130ac68c 1028
28f540f4 1029# These are the variables that the implicit compilation rules use.
ce460d04
RM
1030# Note that we can't use -std=* in CPPFLAGS, because it overrides
1031# the implicit -lang-asm and breaks cpp behavior for .S files--notably
1032# it causes cpp to stop predefining __ASSEMBLER__.
64d9580c 1033CPPFLAGS = $(config-extra-cppflags) $(CPPFLAGS-config) \
7ffa9423 1034 $($(subdir)-CPPFLAGS) \
130ac68c 1035 $(+includes) $(defines) $(module-cppflags) \
ae8b36f7 1036 -include $(..)include/libc-symbols.h $(sysdep-CPPFLAGS) \
130ac68c 1037 $(CPPFLAGS-$(suffix $@)) \
d29724f8 1038 $(foreach lib,$(libof-$(basename $(@F))) \
bc96fbda 1039 $(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \
33237fe8
AZN
1040 $(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F))) \
1041 -DTOP_NAMESPACE=glibc
67e58f39 1042
783dd2d3 1043override CFLAGS = -std=gnu11 -fgnu89-inline $(config-extra-cflags) \
7735afa2 1044 $(filter-out %frame-pointer,$(+cflags)) $(+gccwarn-c) \
a6d2f948 1045 $(+extra-math-flags) $(+extra-time-flags) \
7735afa2 1046 $(sysdep-CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) \
e400f3cc 1047 $(CFLAGS-$(@F)) $(tls-model) \
44f0a71e
UD
1048 $(foreach lib,$(libof-$(basename $(@F))) \
1049 $(libof-$(<F)) $(libof-$(@F)),$(CFLAGS-$(lib)))
83212868
L
1050# Use our copies of cstdlib and cmath.
1051override CXXFLAGS = -I$(common-objpfx) $(c++-sysincludes) \
ef226fec 1052 $(filter-out %frame-pointer,$(+cflags)) $(sysdep-CFLAGS) \
7735afa2 1053 $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) $(CFLAGS-$(@F))
28f540f4 1054
cc3fa755
UD
1055# If everything is compiled with -fPIC (implicitly) we must tell this by
1056# defining the PIC symbol.
1057ifeq (yes,$(build-pic-default))
1058pic-default = -DPIC
1059endif
1060
f0bf9cb9
RM
1061# Enable object files for different versions of the library.
1062# Various things use $(object-suffixes) to know what all to make.
1063# The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
1064# to pass different flags for each flavor.
91641c65 1065libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
612148c6
FW
1066# .op may be added to all-object-suffixes below.
1067all-object-suffixes := .o .os .oS
650425ce 1068object-suffixes :=
cc3fa755 1069CPPFLAGS-.o = $(pic-default)
9d7a3741
L
1070# libc.a must be compiled with -fPIE/-fpie for static PIE.
1071CFLAGS-.o = $(filter %frame-pointer,$(+cflags)) $(pie-default)
64d9580c
FB
1072CFLAGS-.o += $(call elide-fortify-source,.o,$(routines_no_fortify))
1073CFLAGS-.o += $(call elide-fortify-source,_chk.o,$(routines_no_fortify))
f0bf9cb9 1074libtype.o := lib%.a
650425ce 1075object-suffixes += .o
f0bf9cb9
RM
1076ifeq (yes,$(build-shared))
1077# Under --enable-shared, we will build a shared library of PIC objects.
40a55d20
UD
1078# The PIC object files are named foo.os.
1079object-suffixes += .os
900fa257
AZ
1080pic-cppflags = -DPIC -DSHARED
1081CPPFLAGS-.os = $(pic-cppflags)
14e9dd67 1082CFLAGS-.os = $(filter %frame-pointer,$(+cflags)) $(pic-ccflag)
64d9580c
FB
1083CFLAGS-.os += $(call elide-fortify-source,.os,$(routines_no_fortify))
1084CFLAGS-.os += $(call elide-fortify-source,_chk.os,$(routines_no_fortify))
40a55d20 1085libtype.os := lib%_pic.a
26b4d766
UD
1086# This can be changed by a sysdep makefile
1087pic-ccflag = -fPIC
231e88a4
UD
1088# This one should always stay like this unless there is a very good reason.
1089PIC-ccflag = -fPIC
f0bf9cb9 1090endif
7b91359b 1091# This can be changed by a sysdep makefile
51231c46 1092pie-ccflag = -fPIE
23645707 1093no-pie-ccflag = -fno-pie
7b91359b
UD
1094# This one should always stay like this unless there is a very good reason.
1095PIE-ccflag = -fPIE
f0bf9cb9
RM
1096ifeq (yes,$(build-profile))
1097# Under --enable-profile, we will build a static library of profiled objects.
40a55d20 1098# The profiled object files are named foo.op.
612148c6 1099all-object-suffixes += .op
40a55d20 1100object-suffixes += .op
cc3fa755 1101CPPFLAGS-.op = -DPROF $(pic-default)
9d7a3741
L
1102# libc_p.a must be compiled with -fPIE/-fpie for static PIE.
1103CFLAGS-.op = -pg $(pie-default)
64d9580c
FB
1104CFLAGS-.op += $(call elide-fortify-source,.op,$(routines_no_fortify))
1105CFLAGS-.op += $(call elide-fortify-source,_chk.op,$(routines_no_fortify))
40a55d20 1106libtype.op = lib%_p.a
f0bf9cb9 1107endif
ab95290c 1108
c1487492
RM
1109# Convenience variable for when we want to treat shared-library cases
1110# differently from the rest.
1111object-suffixes-noshared := $(filter-out .os,$(object-suffixes))
1112
9afc8a59
UD
1113object-suffixes-for-libc := $(object-suffixes)
1114
1115ifeq (yes,$(build-shared))
1116# Build special library that contains the static-only routines for libc.
1117object-suffixes-for-libc += .oS
1118
1119# Must build the routines as PIC, though, because they can end up in (users')
1120# shared objects. We don't want to use CFLAGS-os because users may, for
1121# example, make that processor-specific.
6413fcde 1122CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag) $(extra-nonshared-cflags)
06b31ad3 1123CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
9afc8a59
UD
1124libtype.oS = lib%_nonshared.a
1125endif
1126
073e82bf
RM
1127# The assembler can generate debug information too.
1128ifndef ASFLAGS
2e7c805d 1129ASFLAGS := $(filter -g% -fdebug-prefix-map=%,$(CFLAGS))
073e82bf 1130endif
93a2584c 1131override ASFLAGS += -Werror=undef $(ASFLAGS-config) $(asflags-cpu)
9afc8a59 1132
96bda0ea
RM
1133ifndef BUILD_CC
1134BUILD_CC = $(CC)
1135endif
e72bfd87
UD
1136
1137move-if-change = $(SHELL) $(..)scripts/move-if-change
a641835a 1138\f
281e6031
UD
1139-include $(common-objpfx)sysd-sorted
1140subdirs = $(sorted-subdirs)
e0a3ed4f
RM
1141subdir-srcdirs = $(foreach dir,$(subdirs),\
1142 $(firstword $($(dir)-srcdir) $(..)$(dir)))
9a0a462c 1143
f3787738
RM
1144# This is a pair of implicit rules to preprocess a file with # comments,
1145# %ifdef et al, based on config.h settings or other %include'd files.
1146# We use chained rules instead of a pipeline here so that we can properly
1147# check the exit status of cpp rather than using its bad output when there
1148# is a preprocessing error. Another rule should depend on the output file
1149# `FOO.v', and along with that `FOO.v.i' should be given dependencies
1150# listing both its input files, and any header files that it may reference
1151# (but no commands).
8744841f
RM
1152%.v.i: $(common-objpfx)config.h $(..)Makeconfig
1153 sed '/^[ ]*%/!s/#.*$$//;/^[ ]*$$/d;s/^[ ]*%/#/' \
90f42071 1154 $(filter-out FORCE %.h $(..)Makeconfig,$^) \
02838201 1155 | $(CC) -E -undef $(CPPFLAGS) -x assembler-with-cpp - \
f3787738
RM
1156 > $@T
1157 mv -f $@T $@
1158%.v: %.v.i
1159 sed '/^[ ]*#/d;/^[ ]*$$/d' $< > $@T
1160 mv -f $@T $@
480d827b 1161
7e80ddb8
RM
1162ifeq (yes, $(build-shared))
1163
0ab0291b
L
1164# To generate a header to support more than one ABI for different
1165# architecture variants, the CPU/Makefile defines abi-variants to be a
1166# list of names for those variants (e.g. 32 64), and, for each variant,
1167# defines abi-$(variant)-condition to be the condition for those options
1168# to use in a C #if condition. abi-includes may be defined to a list of
1169# headers to include in the generated header, if the default does not
88a4576f
JM
1170# suffice. default-abi is defined to be the ABI for the current glibc
1171# build.
0ab0291b
L
1172
1173ifndef abi-includes
1174abi-includes := bits/wordsize.h
1175endif
1176
4de1d597
RM
1177# Process the shlib-versions file, which tells us what shared library
1178# version numbers to use when we install shared objects on this system.
281e6031
UD
1179# We need to wait until $(subdirs) is complete.
1180ifeq ($(sysd-sorted-done),t)
4de1d597 1181-include $(common-objpfx)soversions.mk
eca3eb3b 1182ifndef avoid-generated
f3787738 1183$(common-objpfx)shlib-versions.v.i: \
e0a3ed4f
RM
1184 $(wildcard $(+sysdep_dirs:=/shlib-versions) \
1185 $(subdir-srcdirs:=/shlib-versions)) \
9632aaee 1186 $(..)shlib-versions
6d864d15 1187
6d864d15
RM
1188$(common-objpfx)soversions.i: $(..)scripts/soversions.awk \
1189 $(common-objpfx)shlib-versions.v
af296fcd 1190 $(AWK) -f $^ > $@T
ba7e89ec 1191 mv -f $@T $@
3e1e123d 1192$(common-objpfx)soversions.mk: $(common-objpfx)soversions.i $(..)Makeconfig
0ab0291b 1193 (while read which lib number setname; do \
3e1e123d 1194 eval seen_$$which=1; \
91adb529 1195 test x"$$which" = xDEFAULT || continue; \
1bc777b8
UD
1196 case $$number in \
1197 [0-9]*) echo "$$lib.so-version=.$$number"; \
1198 echo "all-sonames+=$$lib=$$lib.so\$$($$lib.so-version)";;\
93ae1eba 1199 *) echo "$$lib.so-version=$$number"; \
1bc777b8
UD
1200 echo "all-sonames+=$$lib=\$$($$lib.so-version)";;\
1201 esac; \
1202 done; \
1203 echo soversions.mk-done = t;) < $< > $@T; exit 0
4de1d597 1204 mv -f $@T $@
eca3eb3b 1205endif
281e6031 1206endif
eca3eb3b 1207
f3787738
RM
1208postclean-generated += soversions.mk soversions.i \
1209 shlib-versions.v shlib-versions.v.i
4de1d597 1210
130ac68c 1211before-compile += $(common-objpfx)libc-modules.h
65b6d8b7 1212common-generated += libc-modules.h libc-modules.stmp
130ac68c
SP
1213ifeq ($(soversions.mk-done),t)
1214# Generate a header with macro definitions for use with the IS_IN macro.
279bc5b3 1215# These are the possible values for the MODULE_NAME macro defined when building
130ac68c
SP
1216# sources, to identify which module the translation unit is going to be built
1217# into.
1218$(common-objpfx)libc-modules.h: $(common-objpfx)libc-modules.stmp; @:
1219$(common-objpfx)libc-modules.stmp: $(..)scripts/gen-libc-modules.awk \
1220 $(common-objpfx)soversions.i
1221 $(AWK) -v buildlist="$(subst -,_,$(built-modules))" -f $^ > ${@:stmp=T}
1222 $(move-if-change) ${@:stmp=T} ${@:stmp=h}
1223 touch $@
1224
1225endif
1226
67e58f39
SP
1227# Build the tunables list header early since it could be used by any module in
1228# glibc.
67e58f39 1229before-compile += $(common-objpfx)dl-tunable-list.h
65b6d8b7
ZW
1230common-generated += dl-tunable-list.h dl-tunable-list.stmp
1231
1232$(common-objpfx)dl-tunable-list.h: $(common-objpfx)dl-tunable-list.stmp; @:
1233$(common-objpfx)dl-tunable-list.stmp: \
1234 $(..)scripts/gen-tunables.awk \
1235 $(..)elf/dl-tunables.list \
1236 $(wildcard $(subdirs:%=$(..)%/dl-tunables.list)) \
1237 $(wildcard $(sysdirs:%=%/dl-tunables.list))
1238 $(AWK) -f $^ > ${@:stmp=T}
1239 $(move-if-change) ${@:stmp=T} ${@:stmp=h}
1240 touch $@
67e58f39 1241
ef7c6d42
FW
1242# Dump the GCC macros used by the default compiler flags to a header
1243# file, so that they can be inspected when using different compiler
1244# flags. Add the GCCMACRO prefix to make these macro names unique.
1245$(common-objpfx)gcc-macros.h.in: $(common-objpfx)config.status
1246 $(CC) $(CFLAGS) $(CPPFLAGS) -E -dM -x c -o $@ /dev/null
1247$(common-objpfx)gcc-macros.h: $(common-objpfx)gcc-macros.h.in
1248 sed 's/^#define /#define GCCMACRO/' < $< > $@
1249before-compile += $(common-objpfx)gcc-macros.h
1250
462d348c
AS
1251# Generate version maps, but wait until sysdep-subdirs is known
1252ifeq ($(sysd-sorted-done),t)
1253ifeq ($(build-shared),yes)
1254-include $(common-objpfx)sysd-versions
1255-include $(common-objpfx)Versions.mk
1256$(addprefix $(common-objpfx),$(version-maps)): $(common-objpfx)sysd-versions
1257common-generated += $(version-maps)
1258postclean-generated += sysd-versions Versions.all abi-versions.h \
1259 Versions.def Versions.v.i Versions.v Versions.mk
1260
1261ifndef avoid-generated
1262ifneq ($(sysd-versions-subdirs),$(sorted-subdirs) $(config-sysdirs))
1263sysd-versions-force = FORCE
1264FORCE:
1265endif
1266
1267$(common-objpfx)Versions.def: $(..)scripts/versionlist.awk \
1268 $(common-objpfx)Versions.v
1269 LC_ALL=C $(AWK) -f $^ > $@T
1270 mv -f $@T $@
1271
1272$(common-objpfx)Versions.all: $(..)scripts/firstversions.awk \
1273 $(common-objpfx)soversions.i \
1274 $(common-objpfx)Versions.def
1275 { while read which lib version setname; do \
1276 test x"$$which" = xDEFAULT || continue; \
1277 test -z "$$setname" || echo "$$lib : $$setname"; \
1278 done < $(word 2,$^); \
1279 cat $(word 3,$^); \
1280 } | LC_ALL=C $(AWK) -f $< > $@T
1281 mv -f $@T $@
1282$(common-objpfx)Versions.mk: $(..)scripts/haveversions.awk \
1283 $(common-objpfx)Versions.all
1284 $(AWK) -f $^ > $@T
1285 mv -f $@T $@
1286# See %.v/%.v.i implicit rules in Makeconfig.
1287$(common-objpfx)Versions.v.i: $(wildcard $(subdirs:%=$(..)%/Versions)) \
1288 $(wildcard $(sysdirs:%=%/Versions)) \
1289 $(sysd-versions-force)
1290$(common-objpfx)sysd-versions: $(common-objpfx)versions.stmp
1291$(common-objpfx)versions.stmp: $(common-objpfx)Versions.all \
1292 $(common-objpfx)Versions.v \
1293 $(..)scripts/versions.awk
1294 ( echo 'sysd-versions-subdirs = $(subdirs) $(config-sysdirs)' ; \
1295 cat $(word 2,$^) \
1296 | LC_ALL=C $(AWK) -v buildroot=$(common-objpfx) -v defsfile=$< \
1297 -v move_if_change='$(move-if-change)' \
1298 -f $(word 3,$^); \
1299 ) > $(common-objpfx)sysd-versionsT
1300 mv -f $(common-objpfx)sysd-versionsT $(common-objpfx)sysd-versions
1301 touch $@
1302endif # avoid-generated
1303endif # $(build-shared) = yes
088d3291
AZ
1304
1305-include $(common-objpfx)time64-compat.mk
1306postclean-generated += time64-compat.mk
1307
6b229222
SP
1308$(common-objpfx)time64-compat.mk: $(common-objpfx)time64-compat.mk.i \
1309 $(sysd-versions-force)
088d3291
AZ
1310 sed '/^[ ]*#/d;/^[ ]*$$/d' $< > $@T
1311 mv -f $@T $@
6b229222 1312$(common-objpfx)time64-compat.mk.i: $(..)Makeconfig
088d3291
AZ
1313 printf "#include <time64-compat.h>\n#ifdef TIME64_NON_DEFAULT\nhave-time64-compat = yes\n#endif" \
1314 | $(CC) -E -undef $(CPPFLAGS) -x assembler-with-cpp - > $@T
1315 mv -f $@T $@
1316
1317
462d348c
AS
1318endif # sysd-sorted-done
1319
d41c6f61
UD
1320# The name under which the run-time dynamic linker is installed.
1321# We are currently going for the convention that `/lib/ld.so.1'
1322# names the SVR4/ELF ABI-compliant dynamic linker.
1323ifndef rtld-installed-name
1324ifdef ld.so-version
1325rtld-installed-name = $(ld.so-version)
1326else
1327rtld-installed-name = ld.so.1
1328endif
1329endif
1330
1ef32c3d
UD
1331ifndef rtld-version-installed-name
1332rtld-version-installed-name = ld-$(version).so
1333endif
1334
f649c201
UD
1335endif # build-shared
1336
cbdee279 1337
6ee65ed6
UD
1338ifeq ($(build-shared),yes)
1339libm = $(common-objpfx)math/libm.so$(libm.so-version)
5695d46f 1340libmvec = $(common-objpfx)mathvec/libmvec.so$(libmvec.so-version)
6ee65ed6
UD
1341else
1342libm = $(common-objpfx)math/libm.a
5695d46f 1343libmvec = $(common-objpfx)mathvec/libmvec.a
6ee65ed6
UD
1344endif
1345
c23de0aa
FW
1346ifeq ($(build-shared),yes)
1347libsupport = $(common-objpfx)support/libsupport_nonshared.a
1348else
1349libsupport = $(common-objpfx)support/libsupport.a
1350endif
1351
354e4c1a
TMQMF
1352# This is a partial list of subdirectories containing the library source.
1353# The order is more or less arbitrary. The sorting step will take care of the
1354# dependencies and generate sorted-subdirs dynamically.
8d6f1731 1355all-subdirs = csu assert ctype locale intl catgets math setjmp signal \
e0a3ed4f 1356 stdlib stdio-common libio malloc string wcsmbs time dirent \
0ac35d18 1357 posix io termios resource misc socket sysvipc gmon \
c6b577ca 1358 gnulib iconv iconvdata wctype manual po argp \
e69d994a 1359 localedata timezone rt conform debug mathvec support \
644d3857 1360 dlfcn elf
b22fc5f5 1361
b7e2d9a5 1362ifndef avoid-generated
7bd642f5
RM
1363# sysd-sorted itself will contain rules making the sysd-sorted target
1364# depend on Depend files. But if you just added a Depend file to an
1365# existing directory not in all-subdirs, then sysd-sorted needs to
1366# be regenerated, so it depends on existing $(sorted-subdirs:=/Depend) files.
1367all-Depend-files := $(wildcard $(sort \
95afbbe5 1368 $(foreach dir,$(all-subdirs),\
7bd642f5
RM
1369 $(firstword $($(dir)-srcdir) \
1370 $(..)$(dir))/Depend) \
1371 $(sorted-subdirs:=/Depend)))
e0a3ed4f
RM
1372$(common-objpfx)sysd-sorted: $(..)scripts/gen-sorted.awk \
1373 $(common-objpfx)config.make $(..)Makeconfig \
1374 $(wildcard $(sysdirs:=/Subdirs)) \
1375 $(all-Depend-files)
1376 $(AWK) -f $< \
1377 -v subdirs='$(all-subdirs)' \
1378 -v srcpfx='$(..)' \
1379 $(filter %/Subdirs %/Depend,$^) > $@-tmp
bb41a976 1380 mv -f $@-tmp $@
9de06f3c 1381$(all-Depend-files): ;
b7e2d9a5 1382endif
bb41a976 1383
16cd816f
RM
1384# This gives partial TARGET:SOURCE pattern pairs to have rules
1385# emitted into sysd-rules. A sysdeps Makeconfig fragment can
1386# add its own special object file prefix to this list with e.g. foo-%:%
1387# to have foo-*.? compiled from *.? using $(foo-CPPFLAGS).
bc96fbda 1388sysd-rules-patterns := %:% rtld-%:rtld-% rtld-%:% m_%:s_%
16cd816f 1389
083973f3 1390# Let sysdeps/ subdirs contain a Makeconfig fragment for us to include here.
e0a3ed4f 1391sysdep-makeconfigs := $(wildcard $(+sysdep_dirs:=/Makeconfig))
083973f3 1392ifneq (,$(sysdep-makeconfigs))
e0a3ed4f 1393include $(sysdep-makeconfigs)
083973f3
RM
1394endif
1395
363a641b 1396# Compute just the target patterns. Makeconfig has set sysd-rules-patterns.
bc96fbda
AS
1397sysd-rules-targets := $(sort $(foreach p,$(sysd-rules-patterns),\
1398 $(firstword $(subst :, ,$p))))
083973f3 1399
ad201afe
FW
1400# $(libpthread-routines-var) and $(librt-routines-var) are the make
1401# variable to which pthread routines need to be added to land in the
1402# right library.
1403ifeq ($(pthread-in-libc),yes)
1404libpthread-routines-var = routines
1405librt-routines-var = routines
dbb949f5 1406libanl-routines-var = routines
ad201afe
FW
1407else
1408libpthread-routines-var = libpthread-routines
a2014d31 1409librt-routines-var = librt-routines
dbb949f5 1410libanl-routines-var = libanl-routines
ad201afe
FW
1411endif
1412
c75ccd4c
RM
1413# A sysdeps Makeconfig fragment may set libc-reentrant to yes.
1414ifeq (yes,$(libc-reentrant))
1415defines += -D_LIBC_REENTRANT
1416
1417libio-mtsafe = -D_IO_MTSAFE_IO
1418endif
1419
591aeaf7
TD
1420# The name to give to a test in test results summaries.
1421test-name = $(strip $(patsubst %.out, %, $(patsubst $(common-objpfx)%, %, $@)))
1422
54ee292d
JM
1423# Likewise, in XFAIL variable names.
1424test-xfail-name = $(strip $(patsubst %.out, %, $(patsubst $(objpfx)%, %, $@)))
1425
f8c17e79 1426# Command to output a test status line (such as PASS: test-name). If
54ee292d 1427# test-xfail-$(test-xfail-name) has a nonempty value, the status will be
f8c17e79 1428# XPASS or XFAIL rather than PASS or FAIL.
591aeaf7 1429evaluate-test = $(..)scripts/evaluate-test.sh $(test-name) $$? \
54ee292d 1430 $(if $(test-xfail-$(test-xfail-name)),true,false) \
d6fe5e58 1431 $(if $(stop-on-test-failure),true,false) \
591aeaf7
TD
1432 > $(common-objpfx)$(test-name).test-result
1433
28f540f4 1434endif # Makeconfig not yet included
c238ecf7
UD
1435
1436# Local Variables:
1437# mode: makefile
1438# End: