Commit Graph

947 Commits

Author SHA1 Message Date
Ed Maste
27051ca14b Restore addr2line to cross tools
Addr2line is not required for the build, and a per-arch binary is no
longer required with the switch to the ELF Tool Chain. However, building
these tools during the cross tools stage can be useful for developers
who cross build HEAD from stable/10, and adds very little to the build
time.

Reviewed by:	ian, imp
Differential Revision:	https://reviews.freebsd.org/D1583
2015-01-23 21:34:08 +00:00
Ed Maste
8b817932f7 Fix bootstrap on systems with old libdwarf and WITHOUT_CDDL
ELF Tool Chain tools need libelf and libdwarf.

Submitted by:	jmallett (earlier version)
Reviewed by:	jmallett
Sponsored by:	The FreeBSD Foundation
2015-01-21 21:49:03 +00:00
Ed Maste
da010b5606 Remove addr2line from cross elftoolchain tools list
It is not required, and there is no reason to install it just because it
came with the binutils cross tools.

Sponsored by:	The FreeBSD Foundation
2015-01-21 19:04:55 +00:00
Baptiste Daroussin
2d2813618c Remove GNU texinfo from base along with all info pages.
To be able to info pages consider installing texinfo from ports print/texinfo or
via pkg: pkg install texinfo

Differential Revision:	https://reviews.freebsd.org/D1409
Reviewed by:	emaste, imp (previous version)
Relnotes:	yes
2015-01-02 18:45:03 +00:00
Ed Maste
7d612a433e Use BINUTILS_BOOTSTRAP knob for binutils only
Previously it also disabled building elftoolchain bootstrap tools such as
strip(1).

Differential Revision:	https://reviews.freebsd.org/D1398
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
2014-12-30 18:42:53 +00:00
Enji Cooper
851cc4c0c3 Update the text for building texinfo with build-tools to reflect the fact
that make install is being called as well

MFC after: 1 week
X-MFC with: r276052
2014-12-22 04:54:57 +00:00
Enji Cooper
492c2b1f49 Build selective portions of gnu/usr.bin/texinfo as part of build-tools to
ensure that building on a host without makeinfo (i.e. a host where
make delete-old -DWITHOUT_INFO was run), then building with MK_INFO == yes
doesn't manifest in build errors when building info pages

This manifested itself like the following when I was build testing an MFC
change on stable/10:

  makeinfo --no-split -I /usr/src/gnu/lib/libregex/doc -I /usr/src/gnu/lib/libregex/doc regex.texi  -o regex.info
  makeinfo: not found
  *** [regex.info] Error code 127

make[6]: stopped in /usr/src/gnu/lib/libregex/doc
1 error

Tested on a head VM without makeinfo installed and by building with MK_INFO=yes

MFC after: 1 week
2014-12-22 04:52:24 +00:00
Enji Cooper
9e7d291e9a Fix accidental MK_DEBUG_FILES=no addition to NXBMAKE in r275909
X-MFC with: r275909
Sponsored by: EMC / Isilon Storage Division
2014-12-18 18:30:33 +00:00
Enji Cooper
c8ed1da7c3 Don't build full clang toolchain or clang extras in stages 1-3 of buildworld
MFC after: 1 week
Reviewed by: dim (as part of a "larger" diff)
Phabric: D1336
Sponsored by: EMC / Isilon Storage Division
2014-12-18 18:26:10 +00:00
Enji Cooper
f703589ef4 Fix building/installing tests when TESTSBASE != /usr/tests
The work in r258233 hardcoded the assumption that tests was the last component
of the tests tree by pushing tests as an explicit prefix for the paths in
BSD.tests.dist and /usr was the prefix for all tests, per BSD.usr.dist and all
of the mtree calls used in Makefile.inc1. This assumption breaks if/when one
provides a custom TESTSBASE "prefix", e.g. TESTSBASE=/mytests .

One thing that r258233 did properly though was remove "/usr/tests" creation
from BSD.usr.dist -- that should have not been there in the first place. That
was an "oops" on my part for the work that was originally committed in r241823

MFC after: 2 weeks
Phabric: D1301
Reviewed by: imp
Sponsored by: EMC / Isilon Storage Division
2014-12-18 18:16:00 +00:00
Enji Cooper
f9d93ea775 Fix sporadic build failures due to race when running make installworld
when strip gets replaced at install time by adding it to ITOOLS for the
default usr.bin/xinstall STRIP_CMD

This will fix the failure noted in this Jenkins build step:
https://jenkins.freebsd.org/job/Build-UFS-image/688/

This will also fix the issue reported by alfred@ dealing with installing on
targets that differ from build hosts (e.g. installing on i386/i386 when built
on amd64/amd64)

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2014-12-17 20:02:07 +00:00
Brooks Davis
5f25ee9cef Add an UPDATING entry and warning about the change in r274807 to help users
transition to the new behavior.

Discussed with:	jmallett
Sponsored by:	DARPA, AFRL
2014-12-16 20:45:17 +00:00
Enji Cooper
46fe68cd1c Add makewhatis to ITOOLS if MK_MAN != no
This will fix installation with differing host targets in installworld, so
one can build i386/i386 on an amd64 host, then install to an i386/i386 target

Reported by: alfred
Phabric: D1280
MFC after: 1 week
2014-12-08 18:29:20 +00:00
Enji Cooper
317b32d45e Build gperf with xdev as part of _xb-bootstrap-tools
This will unbreak the build when "env MK_CXX=no make delete-old" has been run
on the build host post-r272849

Tested with the following commands:

/bin/sh
export __MAKE_CONF=/dev/null SRCCONF=/dev/null
export MK_CLANG=no MK_CLANG_BOOTSTRAP=no MK_GCC=yes MK_GCC_BOOTSTRAP=yes
export MK_GNUCXX=yes TARGET=armv6 TARGET_ARCH=arm make xdev
make toolchain
make xdev-build
sudo -E make xdev-install
/usr/armv6-freebsd/usr/bin/cc -dumpmachine | grep arm

X-MFC with: r272849
Reported by: Dan Raymond <draymond@foxvalley.net>, gjb
2014-12-08 09:09:50 +00:00
Enji Cooper
2bc62d50f6 Build gperf with xdev as part of _xb-bootstrap-tools to unbreak the build
if/when MK_CXX == no and make delete-old has been run on the build host,
post-r272849

Tested with the following command:

% sudo env MK_CLANG=no MK_CLANG_BOOTSTRAP=no MK_GCC=yes MK_GCC_BOOTSTRAP=yes \
           MK_GNUCXX=yes make xdev
2014-12-08 07:33:11 +00:00
Enji Cooper
1955a4bf0e Push the build-tools logic down into Makefile.inc1 so it's localized all in
one spot, and the potential for installing to the wrong DESTDIR is lower
2014-12-08 06:33:49 +00:00
Enji Cooper
da976f9d68 MFhead @ r275496 2014-12-05 07:48:25 +00:00
Ed Maste
3194293903 Build infrastructure for elftoolchain tools
Set WITH_ELFTOOLCHAIN_TOOLS in src.conf to use the elftoolchain version
of the following tools:

 * addr2line
 * elfcopy (strip / mcs)
 * nm
 * size
 * strings

Reviewed by:	bapt (earlier version)
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1224
2014-12-01 17:49:42 +00:00
Enji Cooper
1d91a05822 share/termcap requires ex from usr.bin/vi in order to compile, and since usr.bin
comes after share in SUBDIR in Makefile.inc1, the build will fail when vi is not
installed on the build host

Run build-tools for usr.bin/vi and install ex, etc to WORLDTMP to enable building
share/termcap on hosts that don't have nvi installed on them
2014-11-29 01:53:27 +00:00
Enji Cooper
f541dd9b51 Implement MK_RADIUS_SUPPORT to make libradius and assorted support optional 2014-11-27 04:16:47 +00:00
Enji Cooper
7e57795a34 Don't try and build 32-bit versions of hyperv / bhyve 2014-11-26 06:54:17 +00:00
Brooks Davis
0e97688fe1 Slightly alter the handling of LOCAL_LIB_DIRS to skip addition of
directories in LOCAL_LIB_DIRS if they are subdirectories of directories
listed in LOCAL_DIRS.  This allows a hierarchy like:

	foo
	foo/lib
	foo/usr.bin
	foo/usr.sbin

to be supported with LOCAL_DIRS=foo LOCAL_DIRS=foo/lib.

MFC after:	1 week
Sponsored by:	DARPA, AFRL
2014-11-21 18:35:48 +00:00
Brooks Davis
e163efb6c7 Add a guard against attempting to invoke the buildenv target with -j# as
that silently exits rather than doing something useful.

MFC after:	1 week
Sponsored by:	DARPA, AFRL
2014-11-21 18:18:37 +00:00
Sean Bruno
e93397e537 Add mv, echo and hostname to the native-xtools target. Missed these
when profiling.

MFC after:	2 weeks
2014-11-16 23:31:23 +00:00
Sean Bruno
e98c3c3f9d Flush out many more static binaries that can be used in a jail for building
pkgs via poudriere.  This removes a significant amount of emulation speeding
up run times.

Phabric:	D1172
Reviewed by:	imp
MFC after:	2 weeks
2014-11-16 20:10:37 +00:00
Sean Bruno
2c8c40a7ad Add more static binaries to the native-xtools target. These help speed
up the cross builds significantly.

adding:
bin/sh
bin/csh
sbin/md5
usr.bin/bzip2
usr.bin/fetch
usr.bin/gzip
usr.bin/tar
usr.bin/unzip
usr.bin/xz

Phabric: D1146
Reviewed by:	imp bdrewery
MFC after:	2 weeks
2014-11-13 22:25:22 +00:00
Enji Cooper
6e48c75269 Fix build race in Makefile.inc1 after r274226 by adding lib/libm__L dependency
for gnu/lib/libdialog

Sponsored by: EMC / Isilon Storage Division
2014-11-08 04:24:54 +00:00
Devin Teske
b78618fbda For really fast machines, an edge-case may exist where dpv(3) may be
built before contrib dependency, dialog(3). Add dialog(3) to the list
of _prebuild_libs to ensure that this does not happen.

Tested on:	11.0-CURRENT amd64 @ r274205
Thanks to:	kargl, Larry Rosenman <ler@lerctr.org>, ngie, markj
Recommended by:	ngie
Reviewed by:	ngie, markj
MFC after:	21 days
X-MFC-to:	stable/10 stable/9
X-MFC-with:	274116 274120 274121 274123 274144 274146 274192 274203
2014-11-07 00:59:40 +00:00
Devin Teske
2b293f6aa1 SUBDIR_DEPENDS__ in lib/Makefile is not working out so well for me.
Add to using _prebuild_libs in (top-level) Makefile.inc1.
NB: Unbreak build yet again (we'll get this right eventually)

Reviewed by:	markj, ngie
Thanks to:	ian, markj, ngie, Nikolai Lifanov <lifanov@mail.lifanov.com>
MFC after:	21 days
X-MFC-to:	stable/10 stable/9
X-MFC-with:	274116 274120 274121 274123 274144 274146 274192
2014-11-06 22:53:50 +00:00
Baptiste Daroussin
75c3b1178b Rename XFLAGS to XCFLAGS and XXFLAGS to XCXXFLAGS
This is less confusing names and actually more reflexting what they are intended
to.

Discussed with:	brooks
2014-10-27 23:31:07 +00:00
Warner Losh
b55e8e6e0d My previous commit exposed an issue as it fixed a different
issue. lib/atf isn't a prereq_lib, since it isn't required for other
libraries to build. Remove it. The old kludge of always building it
had effectively been retired. Since we don't want to build the
libraries with the tests when we're bootstrapping, invent
MK_TESTS_SUPPORT which normally defaults to the current MK_TESTS
value, except when explicitly defined. Make lib/atf depend on it being
yes. When building the libraries set MK_TESTS to no, and
MK_TESTS_SUPPORT to the current value of MK_TESTS so that later stages
of the build work correctly. This should fix (and does for me)
people's issues with parallel builds racing between lib/atf and
libexec/atf. Since lib/atf is built during the libraries phase, the
race disappears.
2014-10-22 03:39:11 +00:00
Warner Losh
983678dd7c Generate both userland and kernel option settings for showconfig.
PR: 191920
2014-10-21 20:29:51 +00:00
Warner Losh
e8a66c33e4 You aren't allowed to test WITH_xxx or WITHOUT_xxx here, so remove it.
Even if you were allowed to test for it, the test makes no sense as it
always results in adding -DWITH_ATF unless WITH_ATF was already
defined. But if MK_ATF != no, then we know it was defined. This, in
turn, caused tools/build/options/makemake always think WITH_ATF is the
default, which removed control of that from sys.conf.mk.

To get the intent of the deleted comment, another mechanism is
required, assuming that the intent of that comment is desirable.
2014-10-21 20:29:42 +00:00
Baptiste Daroussin
1ff70c7190 Make the external toolchain support grows to the knowleged of XXFLAGS for C++ dedicated flags
and DEPFLAGS for mkdep flags
Pass the path to the libc++ headers in both, enforce the gnu++11 standard in the XXFLAGS
to satisfy libc++ requirements pass the libc++ objectdir as a location where to find
libraries so it can find libstdc++.so and libstdc++.A

Reviewed by:	imp
2014-10-21 20:07:15 +00:00
Baptiste Daroussin
a5edb5fb53 Add size(1) to the cross build toolchain 2014-10-09 15:52:01 +00:00
Baptiste Daroussin
8329338c20 Fix typo 2014-10-09 12:20:00 +00:00
Baptiste Daroussin
481d7bbf62 Add OBJCOPY to the list of external tools 2014-10-09 10:47:14 +00:00
Baptiste Daroussin
46d3ab7588 Fix build when XCC is defined and X_COMPILER_TYPE is not 2014-10-09 09:46:44 +00:00
Baptiste Daroussin
3dce4cb5de Add CROSS_TOOLCHAIN macro select pre seeded external toolchain configuration files
The goal is to provide pre seeded toolchain configurations withing the ports tree
to allow the use of an external toolchain in a simple way:

make CROSS_TOOLCHAIN=powerpc64-gcc TARGET=powerpc TARGET_ARCH=powerpc64 buildworld

This will look for the external toolchain definition in /usr/local/share/mk/powerpc64-gcc.mk
While here add the notion of X_COMPILER_TYPE to the external toolchain framework to allow
to deal with differences between gcc and clang in regards of cross building
2014-10-09 09:04:01 +00:00
Mark Johnston
064291755a Fix dependency errors when linking libproc.
Reported by:	Oliver Hartmann
X-MFC-With:	r272488
2014-10-05 22:13:13 +00:00
Xin LI
c36047bdb7 Add dependencies to various libraries to libzfs and libzpool.
Submitted by:	sef
2014-10-03 20:36:09 +00:00
Andrew Turner
3dde11c478 Fix the TARGET_ABI value clang uses. It shpuld be gnueabi on all ARM
soft-float architectures, and gnueabihf for hard-float.
2014-10-01 12:47:25 +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
Enji Cooper
be26ce21e0 Have distrib-dirs, distribution, hier, hierarchy, redistribute, and reinstall
depend on the .MAKE special target

This will allow users to do something like the following to print out the
results of the running the simulated make target with bmake, like some of the
other top-level make targets in Makefile.inc1:

  % make -f Makefile.inc1 -n distribution TARGET=i386 TARGET_ARCH=i386

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2014-09-24 04:06:54 +00:00
Will Andrews
217c8381d1 Root the lib32 object tree under the overall object tree.
This enables a common root directory for all object files for a given tree,
which eases sharing a common MAKEOBJDIRPREFIX, and cleaning up of object trees.

In particular, one can simply (from the source directory) rm -rf /usr/obj$(pwd)
to destroy all object files for it.  Or to copy/sync files, etc.

Reviewed by:	bdrewery
CR:		https://reviews.freebsd.org/D796
MFC after:	1 month
Sponsored by:	Spectra Logic
2014-09-18 01:57:36 +00:00
Bryan Drewery
5608fd23c2 Revert r267233 for now. PIE support needs to be reworked.
1. 50+% of NO_PIE use is fixed by adding -fPIC to INTERNALLIB and other
   build-only utility libraries.
2. Another 40% is fixed by generating _pic.a variants of various libraries.
3. Some of the NO_PIE use is a bit absurd as it is disabling PIE (and ASLR)
   where it never would work anyhow, such as csu or loader. This suggests
   there may be better ways of adding support to the tree. Many of these
   cases can be fixed such that -fPIE will work but there is really no
   reason to have it in those cases.
4. Some of the uses are working around hacks done to some Makefiles that are
   really building libraries but have been using bsd.prog.mk because the code
   is cleaner. Had they been using bsd.lib.mk then NO_PIE would not have
   been needed.

We likely do want to enable PIE by default (opt-out) for non-tree consumers
(such as ports). For in-tree though we probably want to only enable PIE
(opt-in) for common attack targets such as remote service daemons and setuid
utilities. This is also a great performance compromise since ASLR is expected
to reduce performance. As such it does not make sense to enable it in all
utilities such as ls(1) that have little benefit to having it enabled.

Reported by:	kib
2014-08-19 15:04:32 +00:00
Warner Losh
75872267e8 Create the native-xtools target. This target creates only the cross
building toolchain for the host computer. This toolchain produces
TARGET_ARCH and assumes the rest of the system contains libraries for
the target. It is intended to be used in a "qemu-user jail" where all
the binaries would otherwise be the target architecture's to build
ports. However, emulation of the compilers is too slow, so we build
native binaries for that. Rather than use the xdev produced binaries,
with all their weird links and paths, these binaries use the native
paths. They will not work unless installed into the qemu-user jail.

Differential Revision: https://phabric.freebsd.org/D518
Reviewed by: sbruno@
2014-08-18 21:04:44 +00:00
Enji Cooper
51483c42ed Fix atmconfig compilation when MK_ATM == yes and MK_BSNMP == no
Makefile.inc1:
Always compile gensnmptree with bootstrap-tools when MK_BSNMP != no
instead of depending on a potentially stale tool installed on the build host

sbin/atm/atmconfig/Makefile:
- Always remove oid.h to avoid cluttering up the build/src tree.
- Consolidate all of the RESCUE/MK_BSNMP != no logic under one
conditional to improve readability
- Remove unnecessary ${.OBJDIR} prefixing for oid.h and use ${.TARGET} instead
  of spelling out oid.h
- Add a missing DPADD for ${LIBCRYPTO} when compiled MK_BSNMP == yes and
  MK_OPENSSL == yes and not compiling for /rescue/rescue

sbin/atm/atmconfig/main.c:
Change #ifndef RESCUE to #ifdef WITH_BSNMP in main.c to make it
clear that we're compiling bsnmp support into atmconfig

Approved by: jmmv (mentor)
Phabric: D579
PR: 143830
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2014-08-15 21:22:49 +00:00
Rui Paulo
37fbf89826 Run dtrace in 32-bit mode when compiling 32-bit libraries.
MFC after:	3 days
2014-08-08 23:55:22 +00:00
Ian Lepore
51fa06dd19 m4 now requires libohash, ensure it gets built when bootstrapping. 2014-08-07 21:37:03 +00:00