| Age | Commit message (Collapse) | Author |
|
Add default for MKSTRIPSYM=yes to to bsd.own.mk _MKVARS.no.
Test ${MKSTRIPSYM} != "no".
|
|
Remove the leftover remnants of deprecated USE_COMBINE and NOCOMBINE,
as gcc -combine has been EOL for many years.
Completes the work done by maya@ on 2019-05-10 in bsd.kmodule.mk rev 1.61.
|
|
|
|
|
|
in bsd.lib.mk there's a check for "MKDEBUG != no" that will add
-g to CFLAGS (maybe) and to CSHLIBFLAGS (always), given that it
isn't in CFLAGS already.. except the conditional is "||" instead
of "&&" and since the MKDEBUG/NODEBUG checks pass, the CFLAGS
check isn't even performed.
additionally, check CXXFLAGS as well as CFLAGS.
this fixes the attempt to use "-g1" in the llvmrt build, which
fails because the compile lines end up being "... -g1 .. -g ..",
(the "-g" comes from the CSHLIBFLAGS variable in that case.)
this reduces the size of llvm-enabled gallium debug by ~1.5GiB
on amd64.
|
|
|
|
libraries. We want to lint the private library code and we want to be able
to link against the lint libraries, for example llib-largon2 from cgdconfig
which is accessed via PROGDPLIBS.
|
|
http://mail-index.netbsd.org/source-changes/2021/10/25/msg133295.html
going to add __always_inline to the functions called from _mcount()
discussed on http://mail-index.netbsd.org/source-changes-d/2021/10/25/msg013480.html
|
|
Normally, functions called from mcount.c are expected to be expanded inline,
so _mcount() will never be called recursively. But when build with COPTS=-O0,
`static inline' functions aren't inlined, and _mcount() will be called
recursively.
Even if _mcount() has `__attribute__((__no_ instrument_function__))',
it has no effect on the calling external (no-inlined) function.
To avoid this, PROF.<fn> is added can be set the profiling flag of any file.
"PROF.mcount.c" is set to blank by default, mcount.c itself is compiled
without -pg.
|
|
|
|
the implementation stuff in a variable CTFCONVERT_RUN
- introduce an OBJECT_TARGET variable that contains the output object file
- when we need to run ctfconvert, go through an intermediate ${.TARGET}.o
file, instead of writing directly to ${.TARGET} and then overwriting
${.TARGET} with ctfconvert. This avoids build failures after a build
got interrupted (the "partially built from C" scourge).
|
|
to another shared object
2. Don't compare ${LIBISPRIVATE} to "yes", because there are 3 places in
Makefiles which set it to empty (this was a bug)
3. For private libraries, don't create .so* files
|
|
other shared libraries.
|
|
tech-toolchain@.
|
|
Define _REENTRANT for MKSANITIZER build. This is needed for at least stdio
code. This caused new build issued with duplicated symbols in few places
and rump kernel code picking different code paths borrowed from libc.
Handle all this in one go.
Add bsd.sanitizer.mk to share common code used by programs and libraries.
Switch from realall to beforeinstall target in .syms files. This is more
reliable in MKSANITIZER.
|
|
Some use -f, others don't. This can lead to spurious build failures when
the user performing the build changes. Centralize, and always use -f.
|
|
platforms where PIC is available, so that linking shared objects with
-pg works, without needing to create a shared library version of the
profiled libraries.
|
|
Add flags that are required to build a program and a dynamically loaded
library.
Propagade LIBCSANITIZERFLAGS to CFLAGS and CXXFLAGS.
LDFLAGS is not changed on purpose, as a libcsanitizer is inside libc
and no external dependencies are needed.
Register NOLIBCSANITIZER, as certain distribution parts will need to be
skipped.
|
|
A new keyword SANITIZER_RENAME_SYMBOL. It's a variable that has specified
a list of symbols to be renamed in a processor in order to remove naming
conflicts with public symbols in libc/m/pthread/rt.
This renaming will occur for libraries and programs.
A symbol with a conflicting 'name', will be renamed to '__mksanitizer_name'.
Based on an idea by <christos>
|
|
Introduce a new variable SANITIZERFLAGS that contains all the sanitizer
specific flags. These flags are designed to be passed to CFLAGS, CXXFLAGS
and LDFLAGS.
Pass SANITIZERFLAGS in bsd.prog.mk rules to CFLAGS, CXXFLAGS and LDFLAGS.
Pass SANITIZERFLAGS in bsd.lib.mk rules to *_pic.a build flags. The *_pic.a
libraries are designed to construct .so libraries. All .so libraries with
few exceptions are expected to be prebuilt with a sanitizer. Another
purpuse of *_pic.a files can be constructing static PIE programs, however
they are not supported as of now and there is no sanitization of static
programs either.
Once MKSTATICPIE will be supported, it will be initially incompatible with
MKSANITIZER.
This change also makes it easier to build other targets like kernel and
kernel modules without userland sanitizers.
No functional change intended for MKSANITIZER=no users.
|
|
about unused argument. Note that we can't remove CPPFLAGS from LINK.c because
it is used in the "shuttle rules" (from .c to executable).
|
|
use ${LD} ${LDFLAGS} -r which does not work if we specify MKRELRO since
LDFLAGS is supposed to be passed to LINK.c not LD directly (although some
of the flags work).
|
|
|
|
the call to __mcount.
|
|
with a temporary name and renaming to the final name only after
the file is fully written.
|
|
If it's yes, all local symbols of shared libraries are stripped
(default). If it's no, only temporary local symbols are stripped;
for example, symbols of static functions are kept. Keeping such
symbols is useful on using DTrace for userland libraries and
getting a backtrace from a rump server loading modules (shared
libraries).
Proposed and discussed on tech-kern and tech-toolchain
|
|
- make sure that the default setting of all vars is done in _MKVARS.{yes,no}
if possible.
|
|
|
|
|
|
|
|
|
|
|
|
(If really wanted, *.a generation rule can be easily overriden locally.)
|
|
|
|
|
|
sort.
|
|
.so file from the main link of it, and use the main file as the
input for both the .so output and the .so.debug file. for MKDEBUG
builds we now:
(a) create the (new) .so.full file
(d) create the .so.debug file
(c) create the (installable) .so file
for other builds, we simply use the same rule for (a) to create (c).
this stops the .so.debug rule from modifying the .so rule's target
and leading to mayhem.
see this thread for more details:
http://mail-index.netbsd.org/tech-toolchain/2015/06/03/msg002616.html
|
|
random access archive to avoid races.
|
|
if any of their dependencies (i.e. the files they refer to) are changed.
This allows changes to transitive included headers to be handled properly.
|
|
there could still be more -- i only looked for lines matching
both "HAVE_GCC" and "4" as words (grep -w.)
|
|
(Solaris, OpenBSD)
|
|
|
|
|
|
debugging libraries and do the stripping with the debug symbol separation
step.
|
|
|
|
symbols before the linker can use them. Instead do ${OBJCOPY} -x ${.TARGET}
afterwards.
|
|
|
|
dwarf generation to version 2 for now.
|
|
and use it in the one place (bsd.lib.mk) it's used in share/mk.
|
|
can set MKREPRO=yes and automatically get MKARZERO=yes.
|