<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/gnu, branch releng/12.2</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.2</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.2'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2020-04-27T19:49:35Z</updated>
<entry>
<title>MFC r359702, r359774: enforce -fno-common for userland/kernel src builds</title>
<updated>2020-04-27T19:49:35Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2020-04-27T19:49:35Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=21bc65cb6a23fd1d3f68800f8b4f67b52e02333b'/>
<id>urn:sha1:21bc65cb6a23fd1d3f68800f8b4f67b52e02333b</id>
<content type='text'>
r359702:
Add -fno-common to all userland/kernel src builds

-fno-common will become the default in GCC10/LLVM11. Plenty of work has been
put in to make sure our world builds are no -fno-common clean, so let's slap
the build with this until it becomes the compiler default to ensure we don't
regress.

At this time, we will not be enforcing -fno-common on ports builds. I
suspect most ports will be or quickly become -fno-common clean as they're
naturally built against compilers that default to it, so this will hopefully
become a non-issue in due time. The exception to this, which is actually the
status quo, is that kmods built from ports will continue to build with
-fno-common.

As of the time of writing, I intend to also make stable/12 -fno-common
clean. What's been done will be MFC'd to stable/11 if it's easily applicable
and/or not much work to massage it into being functional, but I anticipate
adding -fcommon to stable/11 builds to maintain its ability to be built with
newer compilers for the rest of its lifetime instead of putting in a third
branch's worth of effort.

r359774:
userland build: replace -fno-common with ${CFCOMMONFLAG}

This change allows any downstream or otherwise consumer to easily override
the new -fno-common default on a temporary basis without having to hack into
src.sys.mk, and also makes it a bit easier to search for these specific
cases where -fno-common must be overridden with -fcommon or else the build
will fail.

The gdb build, the only program requiring -fcommon on head/, is switched
over as an example usage. It will need it on all branches, so this does not
harm future mergability.
</content>
</entry>
<entry>
<title>MFC -fno-common fixes: r359389, r359394, r359397-r359399, r359403-r359404,</title>
<updated>2020-04-09T20:35:35Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2020-04-09T20:35:35Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=9a042535a9eb5ea8dd1b3e0d80483d02f1cba951'/>
<id>urn:sha1:9a042535a9eb5ea8dd1b3e0d80483d02f1cba951</id>
<content type='text'>
r359406, r359413-r359416, r359424-r359425, r359427, r359432-r359433,
r359443, r359675-r359678

Note: this is not necessarily a complete fix to get these programs to build
with -fno-common applied; further work may be needed in this branch.

r359389:
config(8): fixes for -fno-common

Move this handful of definitions into main.c, properly declare these as
extern in config.h. This fixes the config(8) build with -fno-common.

Unexplained in my previous commit to gas, -fno-common will become the
default in GCC10 and LLVM11, so it's worth addressing these in advance.

r359394:
MFV r359393: tcsh: import 6974bc35a5cd

This removes an extra variable definition that causes the -fno-common build
to fail, which will be a new default in GCC10/LLVM11.

r359397:
zfs: fix -fno-common issues

A similar (or identical?) fix has already landed in OpenZFS.

-fno-common will become the default in GCC10/LLVM11.

r359398:
sh: remove duplicate el definition

el is declared extern in myhistedit.h and defined in histedit.c. Remove the
duplicate definition in input.c to appease the -fno-common build.

-fno-common will become the default in GCC10/LLVM11.

r359399:
telnet: remove some duplicate definitions, mark terminaltype extern

Most of these were already properly declared and defined elsewhere, this is
effectively just a minor cleanup that fixes the -fno-common build.

-fno-common will become the default in GCC10/LLVM11.

r359403:
Revert 359399: telnet -fno-common bits

There was a large misfire from my local diff that I need to investigate, and
this version committed did not build.

r359404:
Re-apply r359399: telnet -fno-common fix

line and auth_level's redefinitions are just extraneous

telnetd will #define extern and then include ext.h to allocate storage for
all of these extern'd vars; however, two of them are actually defined in
libtelnet instead. Instead of doing an #ifdef extern dance around those
function pointers, just add an EXTERN macro to make it easier to
differentiate by sight which ones will get allocated in globals.c and which
ones are defined elsewhere.

r359406:
telnet: kill off remaining duplicate definition

r359413:
ipfilter: remove duplicate definition of 'thishost'

thishost is already defined in lib/initparse.c; no need for this one. This
fixes the ipfilter build with -fno-common.

-fno-common will become the default in GCC10/LLVM11.

r359414:
iscontrol: move definition of vflag/iscsidev to iscontrol.c

Mark the declaration extern as these are used elsewhere; this fixes the
build with -fno-common.

r359415:
userboot: mark host_fsops as extern

This is already defined elsewhere; mark this declaration extern to the fix
the -fno-common build.

r359416:
systat: remove redundant definition of kd

kd is already properly declared in extern.h and defined in main.c, rendering
this definition useless. This fixes the -fno-common build.

r359424:
openssh: -fno-common fix from upstream f47d72ddad

This is currently staged in vendor/ as part of the 8.0p1 import, which isn't
quite ready to land. Given that this is a simple one-line fix, apply it now
as the fallout will be pretty minimal.

-fno-common will become the default in GCC10/LLVM11.

r359425:
locate: fix -fno-common build

Just a single variable declaration to extern and define elsewhere here,
myctype.

-fno-common will become a default in GCC10/LLVM11.

r359427:
fsck_ffs/fsdb: fix -fno-common build

This one is also a small list:

- 3x duplicate definition (ufs2_zino, returntosingle, nflag)
- 5x 'needs extern', 3/5 of which are referenced in fsdb

-fno-common will become the default in GCC10/LLVM11.

r359432:
gdb: compile with -fcommon explicitly

As described in the comment, gdb relies on some of the linker magic that
happens with -fcommon. I suspect the life expectancy of gdb-in-base is low
enough that this isn't worth spending much time addressing, especially given
the vintage. Hit it with the -fcommon hammer so that it continues to just
work.

r359433:
bmake: fix -fno-common build

debug was declared extern, but debug_file was not; correct this and define
debug_file in main.c (as debug is) to fix the -fno-common build.

-fno-common will become the default with GCC10/LLVM11.

r359443:
MFV r359442: bmake: import -fno-common fix build back from upstream

sjg@ committed the local patch previously committed upstream; pull it in to
vendor/ to ease any potential stress of future imports.

r359675:
kqueue tests: fix -fno-common build

vnode_fd and kqfd are both shared among multiple CU; define them exactly
once.

In the case of vnode_fd, it was simply the declaration that needed
correction.

-fno-common will become the default in GCC10/LLVM11.

r359676:
ntpd: fix build with -fno-common

Only a small nit here: psl should be declared extern and defined exactly
once.

-fno-common will become the default in GCC10/LLVM11.

r359677:
yp*: fix -fno-common build

This is mostly two problems spread out far and wide:
- ypldap_process should be declared properly
- debug is defined differently in many programs

For the latter, just extern it and define it everywhere that actually needs
it. This mostly works out nicely for ^/libexec/ypxfr, which can remove the
assignment at the beginning of main in favor of defining it properly.

-fno-common will become the default in GCC10/LLVM11.

r359678:
indent: fix the -fno-common build

Spread the globals far and wide, hopefully to the files that make the most
sense.

-fno-common will become the default in GCC10/LLVM11.
</content>
</entry>
<entry>
<title>MFC r352242, r352249</title>
<updated>2020-02-19T14:42:21Z</updated>
<author>
<name>Baptiste Daroussin</name>
<email>bapt@FreeBSD.org</email>
</author>
<published>2020-02-19T14:42:21Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=69fc8cbc793bb1480e738cc5b7175a7ff1865034'/>
<id>urn:sha1:69fc8cbc793bb1480e738cc5b7175a7ff1865034</id>
<content type='text'>
r352242:
Remove usesless readline compat includes which will reinclude readline.h
itself.

This simplifies the upcoming update to newer libedit.

r352249:
Get the readline header from the installed header instead of the from the source
location.
</content>
</entry>
<entry>
<title>MFC r356356, r356358, r356422: replace gcclibs' libssp</title>
<updated>2020-01-16T03:38:06Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2020-01-16T03:38:06Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6df87132a3a5bbee548129be7c5c50efbfefc5c9'/>
<id>urn:sha1:6df87132a3a5bbee548129be7c5c50efbfefc5c9</id>
<content type='text'>
r356356:
Provide libssp based on libc

For libssp.so, rebuild stack_protector.c with FORTIFY_SOURCE stubs that just
abort built into it.

For libssp_nonshared.a, steal stack_protector_compat.c from
^/lib/libc/secure and massage it to maintain that __stack_chk_fail_local
is a hidden symbol.

libssp is now built unconditionally regardless of {WITH,WITHOUT}_SSP in the
build environment, and the gcclibs version has been disconnected from the
build in favor of this one.

r356358:
libssp: fix FORTIFY_SOURCE stub declarations

The LSB 4.1 that I referenced omitted the varargs, and I failed to catch it.
The __vsnprintf_chk error was from just downright misreading the page. GCC6
caught all of these, but I had only tested GCC4.2.

r356422:
Update libssp paths in various Makefile.depend* files

I've been advised that the model that uses these are fairly resilient, but
we do know the proper path to use (or remove, in the case of ^/targets/...),
so go ahead and update them to reflect that.
</content>
</entry>
<entry>
<title>MFC r355940:</title>
<updated>2020-01-07T19:49:10Z</updated>
<author>
<name>Dimitry Andric</name>
<email>dim@FreeBSD.org</email>
</author>
<published>2020-01-07T19:49:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6b6c643f42aa1cd85a5e0ee910b48e61f4f2d986'/>
<id>urn:sha1:6b6c643f42aa1cd85a5e0ee910b48e61f4f2d986</id>
<content type='text'>
Move all sources from the llvm project into contrib/llvm-project.

This uses the new layout of the upstream repository, which was recently
migrated to GitHub, and converted into a "monorepo".  That is, most of
the earlier separate sub-projects with their own branches and tags were
consolidated into one top-level directory, and are now branched and
tagged together.

Updating the vendor area to match this layout is next.
</content>
</entry>
<entry>
<title>Add Makefile.depend.options</title>
<updated>2019-12-19T04:58:11Z</updated>
<author>
<name>Simon J. Gerraty</name>
<email>sjg@FreeBSD.org</email>
</author>
<published>2019-12-19T04:58:11Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=387f2740cab1168555efc6076159d2a66f018a58'/>
<id>urn:sha1:387f2740cab1168555efc6076159d2a66f018a58</id>
<content type='text'>
Leaf directories that have dependencies impacted
by options need a Makefile.depend.options file
to avoid churn in Makefile.depend

DIRDEPS for cases such as OPENSSL, TCP_WRAPPERS etc
can be set in local.dirdeps-options.mk
which can add to those set in Makefile.depend.options

See share/mk/dirdeps-options.mk

Also update affected Makefile.depend files.

MFC of r355616 and r355617

Reviewed by:	 bdrewery
Sponsored by:   Juniper Networks
Differential Revision:  https://reviews.freebsd.org/D22469
</content>
</entry>
<entry>
<title>Add WITH_PIE knob to build Position Independent Executables</title>
<updated>2019-09-26T16:05:57Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2019-09-26T16:05:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=0d5bda912521220c1a2061f9177dbaa6ff2f9c13'/>
<id>urn:sha1:0d5bda912521220c1a2061f9177dbaa6ff2f9c13</id>
<content type='text'>
MFC r344179: Add WITH_PIE knob to build Position Independent Executables

Building binaries as PIE allows the executable itself to be loaded at a
random address when ASLR is enabled (not just its shared libraries).

With this change PIE objects have a .pieo extension and INTERNALLIB
libraries libXXX_pie.a.

MK_PIE is disabled for some kerberos5 tools, Clang, and Subversion, as
they explicitly reference .a libraries in their Makefiles.  These can
be addressed on an individual basis later.  MK_PIE is also disabled for
rtld-elf because it is already position-independent using bespoke
Makefile rules.

Currently only dynamically linked binaries will be built as PIE.

MFC r344181: Fix Makefile conditional after r344179

MFC r344182: Use make's :tl instead of checking "no" and "NO"

MFC r344189: Fixup bsd.prog.mk after r344182

MFC r344211: wlandebug: disable PIE to fix build failure

libifconfig is built as a static-only PRIVATELIB (and there is no _pie.a
version) so disable PIE in libifconfig's consumer.

r345489: Fix GNU objdump build under WITH_PIE

Explicitly specified bare .a libraries need ${PIE_SUFFIX}.

r345490: Apply WITH_PIE changes to other binutils components

Followon to r345489, explicitly specified bare .a libraries need
${PIE_SUFFIX} (although these still built).

r345778: Fix gdb/kgdb build under WITH_PIE

Explicitly specified bare .a libraries need ${PIE_SUFFIX}.

Sponsored by:	The FreeBSD Foundation
</content>
</entry>
<entry>
<title>MFC r339738, r339744, r339770, r339773, r339864-r339866, r339907-r339908, r339912-r339913, r339916, r339954, r340213, r340395, r340840, r340910-r340911, r341424, r342773, r342974, r351027, r352073:</title>
<updated>2019-09-16T13:41:24Z</updated>
<author>
<name>Andrew Turner</name>
<email>andrew@FreeBSD.org</email>
</author>
<published>2019-09-16T13:41:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6592a716f6050bcec9cc479a32d0824f4cc71bf7'/>
<id>urn:sha1:6592a716f6050bcec9cc479a32d0824f4cc71bf7</id>
<content type='text'>
MFC the BSD crtbegin to stable/12 but keep it disabled.

r339738:
Implement a BSD licensed crtbegin/crtend

These are needed for .ctors/.dtors and .jcr handling. The former needs
all the function pointers to be called in the correct order from the
.init/.fini section. The latter just needs to call a gcj specific function
if it exists with a pointer to the start of the .jcr section.

This is currently disabled until __dso_handle support is added.

Reviewed by:	emaste
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D17587

r339744:
Add a missing include for src.opts.mk. Without it MK_TESTS isn't defined.

MFC with:	r339738
Sponsored by:	DARPA, AFRL

r339770:
Drop the csu tests WARNS to 5 to fix the powerpc64 build.

MFC with:	r339738
Sponsored by:	DARPA, AFRL

r339773:
Add __dso_handle to the BSD crtbegin. This is used to identify shared
objects.

MFC with:	r339738
Sponsored by:	DARPA, AFRL

r339864:
Check __dso_handle is NULL in non-DSO objects. It should only be non-NULL
when accessed from a shared object.

MFC with:	r339738
Sponsored by:	DARPA, AFRL

r339865:
Include the csu test directories in BSD.tests.dist

MFC with:	r339738
Sponsored by:	DARPA, AFRL

r339866:
Make the .ctors, .dtors, and .jcr markers as static. They shouldn't be
accessible from out of the files they are defined in.

MFC with:	r339738
Sponsored by:	DARPA, AFRL

r339907:
The jcr argument to _Jv_RegisterClasses is used, stop marking it otherwise.

MFC with:	r339738
Sponsored by:	DARPA, AFRL

r339908:
Run the csu tests on a DSO. This builds the tests into a shared library,
then runs these from the base test programs. With this we can check
crtbeginS.o and crtendS.o are working as expected.

MFC with:	r339738
Sponsored by:	DARPA, AFRL

r339912:
Fix the location of the static keyword.

MFC with:	r339738
Sponsored by:	DARPA, AFRL

r339913:
Disable the .preinit_array test in DSOs, ld.bfd fails to link objects with
the section.

MFC with:	r339738
Sponsored by:	DARPA, AFRL

r339916:
Build the csu tests on all architectures.

The tests haven't been run them, but this is enough to build them so I can
get feedback on if the various crt.h headers are correct.

MFC with:	r339738
Sponsored by:	DARPA, AFRL

r339954:
Add __used to __CTOR_LIST__ and __DTOR_LIST__

Enabling BSD_CRTBEGIN on amd64 resulted in
error: unused variable '__CTOR_LIST__'.

__CTOR_LIST__ is indeed unused in crtbegin.c; it marks the beginning of
the .ctors array and is used in crtend.c.  Annotate __DTOR_LIST__ as
well for consistency.

Discussed with:	andrew
MFC with:	r339738
Sponsored by:	The FreeBSD Foundation

r340213:
Add the (untested) mips and sparc64 .init call sequences.

The BSD crtbegin/crtend code now builds on all architectures, however
further work is needed to check if it works correctly.

MFC with:	r339738
Sponsored by:	DARPA, AFRL

r340395:
Run __cxa_finalize in shared objects in the destructor path.

When we have .dtors call them before .dtor handling, otherwise call from
a destructor.

PR:		233056
MFC with:	r339738
Sponsored by:	DARPA, AFRL

r340840:
Mark the function called by the MIPS .init/.fini sequence with .local.

As with r328939 we need to mark local symbols as such. Without this the
assembly parser treats the symbols as global and created relocations
against these private symbols.

MFC with:	r339738
Sponsored by:	DARPA, AFRL

r340910:
Add the missing 0 at the end of the .jcr section.

Without this the dynamic library test was failing as it was calling
_Jv_RegisterClasses multiple times.

r340911:
Re-enable the dynamiclib tests. These should be fixed by r340910.

r341424:
Disable the BSD CRT code on powerpc and sparc64, they need extra crt*.o
files that haven't been implemented.

Reported by:	sbruno
MFC with:	r339738
Sponsored by:	DARPA, AFRL

r342773:
Add explicit csu test dependency

lib/csu/tests/dynamiclib requires libh_csu.so be built first.  I'm not
sure this is the most correct/best way to address this but it solves
the issue in my testing.

PR:		233734
Sponsored by:	The FreeBSD Foundation

r342974:
Create crtsavres.o for powerpc builds

Summary:
GCC expects to link in a crtsavres.o on powerpc platforms.  On
powerpc64 this is an empty file, but on powerpc and powerpcspe this does contain
some save/restore functions, which may not actually be necessary for newer
modern GCC and clang.  This appeases the in-tree gcc, though, and is needed in
order to switch to the BSD CRTRBEGIN.

PR:	233751
Reviewed By: andrew
Differential Revision: https://reviews.freebsd.org/D18826

r351027:
Enable BSD_CRTBEGIN on powerpc

In r342974 jhibbits added support to build crtsavres.o. This was the
blocker for BSD_CRTBEGIN to be enabled there. As such enable this
option again.

Reviewed by:	jhibbits
Sponsored by:	DARPA, AFRL

r352073:
csu: Add the riscv .init call sequence

Reviewed by:	br
Sponsored by:	Axiado
Differential Revision:	https://reviews.freebsd.org/D21537
</content>
</entry>
<entry>
<title>MFC r350518: as: add deprecation notice to the man page</title>
<updated>2019-08-04T20:40:47Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2019-08-04T20:40:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=5a740b5a71b3764e7ea899558cef585520b702b1'/>
<id>urn:sha1:5a740b5a71b3764e7ea899558cef585520b702b1</id>
<content type='text'>
In the future FreeBSD will ship without GNU binutils 2.17.50.  Add a
note advising users who require GNU as to install the binutils port
or package.

Note that on armv7, arm64, amd64, i386 we currently ship only two
binutils tools (as and objdump).  A deprecation notice was added to
objdump's man page some time ago.

PR:		233611
Sponsored by:	The FreeBSD Foundation
</content>
</entry>
<entry>
<title>objdump: update deprecation notice</title>
<updated>2019-08-04T01:18:50Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2019-08-04T01:18:50Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e5e8e422a724516f8f99baa33276f7ae69f1064f'/>
<id>urn:sha1:e5e8e422a724516f8f99baa33276f7ae69f1064f</id>
<content type='text'>
MFC r350503: objdump: move deprecation notice to indended spot

r335217 added a deprecation notice to the source file for the objdump
man page, and r335219 added it to the rendered objdump.1, but in the
wrong spot.

MFC r350505: objdump: be explicit that GNU objdump that will be removed

We may install llvm-objdump as objdump (see review D18307) or just
provide no /usr/bin/objdump, but either way GNU objdump won't be
installed in the future.

Sponsored by:	The FreeBSD Foundation
</content>
</entry>
</feed>
