Commit Graph

28 Commits

Author SHA1 Message Date
Bryan Drewery
dcf1f83876 Support reading in .depend files.
This is for an upcoming change that fixes .depend handling in here.
It will cause some duplicate sources which need to be trimmed out.

MFC after:	2 weeks
Sponsored by:	DellEMC
2019-06-15 17:08:32 +00:00
Warner Losh
ffec315183 Convert gnu to using SRCTOP
Prefer SRCTOP over CURDIR/../../contrib, etc. However, retain the "up
one level" instances of ../ because they are really relative to this
part of the tree and not a means to find the root of the tree. As
such, it's better to leave them since that further the goal of being
able to move directories if watned to in the future.

Differential Revision:	https://reviews.freebsd.org/D9932
Sponsored by:		Netflix
Silence	On:		arch@ (twice)
2017-03-12 18:59:16 +00:00
Marcel Moolenaar
2b4da8aa20 When MAKEOBJDIRPREFIX points to a case-insensitive file system, the
build can break when different source files create the same target
files (case-insensitivity speaking).  This is the case for object
files compiled with -fpic and shared libraries. The former uses
an extension of ".So", and the latter an extension ".so".  Rename
shared object files from *.So to *.pico to match what NetBSD does.

See also r305855

MFC after:	1 month
Sponsored by:	Bracket Computing
Differential Revision:	https://reviews.freebsd.org/D7906
2016-09-24 15:11:27 +00:00
Bryan Drewery
09fb6bff29 Follow-up r297842: Rework header generation to fix always rebuilding.
This reworks the handling of common headers to just include the needed
logic rather than invoke MAKE.  This avoids the problem listed in r297842
and avoids other dependency tracking issues.

Pointyhat to:	bdrewery
Reported by:	Nikolai Lifanov <lifanov@mail.lifanov.com>
Sponsored by:	EMC / Isilon Storage Division
2016-04-18 18:13:58 +00:00
Bryan Drewery
8a5f439677 META_MODE: Avoid changed build command every build.
Because the file is generated with -f using another Makefile, 2
different Makefiles are trying to handle the .meta file for the
target.  The obvious .NOMETA_CMP or .NOMETA on the ${MAKE} targets
don't work as they are very limited in scope in bmake.  Using
.PHONY fixes the problem and ensures that the ${MAKE} command
is always ran to check if it is outdated in the sub-make.

An example of the problem in gnu/lib/libgcc (with make -dM):
  /usr/obj/root/git/freebsd/gnu/lib/libgcc/tm.h.meta: 2: a build command has changed
  TARGET_CPU_DEFAULT=""  HEADERS="options.h i386/biarch64.h i386/i386.h i386/unix.h i386/att.h dbxelf.h elfos-undef.h elfos.h freebsd-native.h freebsd-spec.h freebsd.h i386/x86-64.h i386/freebsd.h i386/freebsd64.h defaults.h"  DEFINES=""  /bin/sh /root/git/freebsd/gnu/lib/libgcc/../../../contrib/gcc/mkconfig.sh tm.h
  vs
  (cd /root/git/freebsd/gnu/lib/libgcc; make -f /root/git/freebsd/gnu/lib/libgcc/../../usr.bin/cc/cc_tools/Makefile MFILE=/root/git/freebsd/gnu/lib/libgcc/../../usr.bin/cc/cc_tools/Makefile GCCDIR=/root/git/freebsd/gnu/lib/libgcc/../../../contrib/gcc tm.h)
  Skipping meta for tm.h: .NOMETA
  (cd /root/git/freebsd/gnu/lib/libgcc; make -f /root/git/freebsd/gnu/lib/libgcc/../../usr.bin/cc/cc_tools/Makefile MFILE=/root/git/freebsd/gnu/lib/libgcc/../../usr.bin/cc/cc_tools/Makefile GCCDIR=/root/git/freebsd/gnu/lib/libgcc/../../../contrib/gcc tm.h)
  `tm.h' is up to date.

Sponsored by:	EMC / Isilon Storage Division
2016-04-12 02:45:19 +00:00
Bryan Drewery
bd18fd57db DIRDEPS_BUILD: Regenerate without local dependencies.
These are no longer needed after the recent 'beforebuild: depend' changes
and hooking DIRDEPS_BUILD into a subset of FAST_DEPEND which supports
skipping 'make depend'.

Sponsored by:	EMC / Isilon Storage Division
2016-02-24 17:20:11 +00:00
Simon J. Gerraty
ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty
44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty
98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Simon J. Gerraty
9268022b74 Merge from head@274682 2014-11-19 01:07:58 +00:00
Andrew Turner
6d4766c1b8 Remove MK_ARM_EABI, the armeb issues have been fixed. The code to support
the oabi is still in the tree, but it is expected this will be removed
as developers work on surrounding code.

With this commit the ARM EABI is the only supported supported ABI by
FreeBSD on ARMa 32-bit processors.

X-MFC after:	never
Relnotes:	yes
Differential Revision: https://reviews.freebsd.org/D876
2014-10-01 08:26:51 +00:00
Simon J. Gerraty
ee7b0571c2 Merge head from 7/28 2014-08-19 06:50:54 +00:00
Warner Losh
b037ca43df Make sure that the sub-makes for unwind.h start from the CURDIR
(/usr/src) tree rather than the OBJDIR (/usr/obj) tree. This fixes
broken incremental builds with the canonical MAKESYSPATH workaround
of .../share/mk. This is a gross kludge.
2014-06-24 22:15:27 +00:00
Simon J. Gerraty
cc3f4b9965 Merge from head 2014-05-08 23:54:15 +00:00
Warner Losh
c6063d0da8 Use src.opts.mk in preference to bsd.own.mk except where we need stuff
from the latter.
2014-05-06 04:22:01 +00:00
Simon J. Gerraty
3b8f084595 Merge head 2014-04-28 07:50:45 +00:00
Warner Losh
98407b8bc2 Spell NO_PROFILE= as MK_PROFILE=no. 2014-04-25 19:25:26 +00:00
Simon J. Gerraty
f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
David E. O'Brien
d9a447559b Sync with HEAD. 2013-02-08 16:10:16 +00:00
Andrew Turner
1992e9a10c Add compiler support for the ARM EABI.
ARM EABI support is disabled by default and can be enabled by setting
WITH_ARM_EABI when building, however only the kernel-toolchain target will
work with this flag until the rest of the support is added.
2013-01-17 05:56:28 +00:00
Marcel Moolenaar
7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Alexander Kabaev
573cb89b8d Compile libgcov without stack protection. It can be linked into
both static and dynamic binaries compiled with or without stack
protection and should not depend on libssp_nonshared.a symbols.

Discussed with: kib
PR:		bin/139052
2009-10-25 15:52:31 +00:00
Alexander Kabaev
c78339e9d8 Compile static gcov library with -fPIC to match what stock GCC builds
are doing. This is required for libgcov.a to be usable on amd64.

Reported by:	stas
2009-06-21 01:54:47 +00:00
Alexander Kabaev
afb57df680 Update bmake glue to build GCC 4.2.
Also:
        Switch FreeBSD to use libgcc_s.so.1.

        Use dl_iterate_phdr to locate shared objects' exception frame
        info instead of depending on older register_frame_info machinery.
        This allows us to avoid depending on libgcc_s.so.1 in binaries
        that do not use exception handling directly. As an additional
        benefit it breaks circular libc <=> libgcc_s.so.1 dependency too.

        Build newly added libgomp.so.1 library, the runtime support
        bits for OpenMP.

        Build LGPLed libssp library. Our libc provides our own
        BSD-licensed SSP callbacks implementation, so this library
        is only built to benefit applications that have hadcoded
        knowledge of libssp.so and libssp_nonshared.a. When linked
        in from command line, these libraries override libc
        implementation.
2007-05-19 04:25:59 +00:00
Ruslan Ermilov
5740a2b62d Convert NO_PROFILE and NO_LIB32 to new style. 2006-03-18 21:37:05 +00:00
Ruslan Ermilov
ab7a294721 NODOCCOMPRESS -> NO_DOCCOMPRESS
NOINFO -> NO_INFO
NOINFOCOMPRESS -> NO_INFOCOMPRESS
NOLINT -> NO_LINT
NOPIC -> NO_PIC
NOPROFILE -> NO_PROFILE
2004-12-21 09:33:47 +00:00
Ruslan Ermilov
a35d88931c For variables that are only checked with defined(), don't provide
any fake value.
2004-10-24 15:33:08 +00:00
Alexander Kabaev
0d7a4fdf65 Add libgcov, a runtime support library for binaries compiled for basic
block profiling.
2004-08-14 03:23:24 +00:00