20190714:
- The library tls.s7i has been improved to support elliptic curve
diffie hellman key exchange.
- The new library elliptic.s7i has been added. This library supports
elliptic curve cryptography (ECC). The library defines:
- Several named curves,
- Functions to add, double and multiply curve points.
- Functions for fast multiplication with jacobian coordinates.
- Functions to encode and decode curve points.
- Functions to sign and verify messages with the ECDSA.
- The functions emsaPkcs1V15Encoding, emsaPkcs1V15Decoding,
rsassaPkcs1V15Encrypt and rsassaPkcs1V15Decrypt have been added to
the library pkcs1.s7i.
- In x509cert.s7i the function getAlgorithmIdentifier has been improved
to accept algorithm identifiers without algorithm parameters.
- A version of the function createX509Cert, that creates a certificate
with keys for elliptic curve cryptography, has been added.
- The new library showtls.s7i had been added. This library defines
functions to show TLS messages. It can be used to debug tls.s7i.
- The library tar.s7i has been improved to accept extended headers with
meta data (PAX format). Now path and linkpath meta data is accepted.
- A new version of the function bytes() has been added to bytedata.s7i.
This function converts a bigInteger to a string of bytes with a given
length.
- Checks for the multiplication operators * and *:= with factors of
1 and -1 have been added to chkint.sd7.
- Checks for the operator 'lpad0' have been added to chkint.sd7.
- Checks for NaN have been added to chkflt.sd7.
- In the compiler (in comp/const.s7i) the action FLT_MOD has been added
to the list of pure function actions.
- The compiler has been improved to optimize the actions FLT_REM (in
comp/flt_act.s7i) and INT_LPAD0 (in comp/int_act.s7i).
- A corner case of the multiplication operator *:= has been fixed in
the compiler (process_const_int_mult_assign() in comp/int_act.s7i).
The bug occurred in the overflow checking code, when an array element
was multiplied with *:= -1. Multiplications of normal variables and
parameters with *:= and multiplications with other factors except -1
were not affected by this bug.
- Documentation comments have been improved in cc_conf.s7i and
pkcs1.s7i.
- In con_win.c the functions kbdKeyPressed() and kbdGetc() have been
improved to ignore mouse movement and button press events.
- The program chkccomp.c has been improved to have a more detailed
check for POW_OF_NAN_OKAY.
- In fltlib.c checks for 0.0 have been improved in flt_div() and
flt_div_assign().
- In flt_rtl.c preprocessor if statements have been improved to check
for !FLOAT_NAN_COMPARISON_OKAY in fltLog(), fltLog10() fltLog2() and
fltPow().
20190610:
- The library float.s7i has been improved to support the float
operators 'rem' (floating-point remainder) and 'mod' (floating-point
modulo).
- The program chkflt.sd7 has been improved to check floating-point
literals and the new operators 'rem' and 'mod'. The tests for the
operator ** have been improved also.
- Compiler and interpreter have been improved to work correct, even
when the C functions fmod(), exp(), ldexp(), frexp() and sqrt() do
not work 100% correct.
- The program chkccomp.c has been improved to detect weaknesses of
numeric functions. These weaknesses happen when handling with NaN,
Infinity or when other special cases occur.
- A new version of the function timAwait() has been added to tim_unx.c.
This function is used when AWAIT_WITH_NANOSLEEP is defined.
- The makefiles mk_emccl.mak and mk_emccw.mak have been improved to
define AWAIT_WITH_NANOSLEEP instead of AWAIT_WITH_SELECT.
- Interpreter and compiler have been improved to support the actions
FLT_MOD and FLT_REM.
- In the compiler (in comp/flt_act.s7i) a corner case of the action
FLT_IPOW (when CHECK_FLOAT_DIV_BY_ZERO is TRUE and the exponent is
negative and the base is zero (0.0 or -0.0)) has been fixed.
- The configuration values FLOAT_COMPARISON_OKAY, FMOD_FUNCTION_OKAY,
EXP_FUNCTION_OKAY, LDEXP_FUNCTION_OKAY and FREXP_FUNCTION_OKAY have
been added to cc_conf.s7i. The configuration values
NAN_COMPARISON_OKAY and FREXP_INFINITY_NAN_OKAY have been removed.
- The functions fltDecompose(), fltExp(), fltLdexp(), fltMod() and
fltRem() have been added to flt_rtl.c. These functions are used, when
the corresponding C functions frexp(), exp(), ldexp() and fmod() do
not work 100% correct.
- In flt_rtl.c the functions fltEq(), fltGe(), fltGt(), fltLe() and
fltLt() have been improved. These improvements help, when the
comparison of float or double values does not work 100% correct.
- In flt_rtl.c the functions fltPow(), getMantissaAndExponent(),
setMantissaAndExponent() and fltSqrt() have been improved. These
improvements help, when the underlying C functions pow(), frexp(),
ldexp() and sqrt() do not work 100% correct.
- The program chkccomp.c has been improved to define the macros
FLOAT_NAN_COMPARISON_OKAY, FLOAT_ZERO_COMPARISON_OKAY,
SQRT_OF_NAN_OKAY, SQRT_OF_NEGATIVE_OKAY, EXP_OF_NAN_OKAY,
LDEXP_OF_NAN_OKAY, FREXP_SUBNORMAL_OKAY, FMOD_DIVIDEND_NAN_OKAY,
FMOD_DIVISOR_NAN_OKAY, FMOD_DIVIDEND_INFINITY_OKAY,
FMOD_DIVISOR_INFINITY_OKAY and FMOD_DIVISOR_ZERO_OKAY.
- In cmd_rtl.c the function cmdConfigValue has been improved to support
the config values FLOAT_COMPARISON_OKAY, EXP_FUNCTION_OKAY,
FMOD_FUNCTION_OKAY, LDEXP_FUNCTION_OKAY and FREXP_FUNCTION_OKAY.
- Definitions of the macros FLOAT_COMPARISON_OKAY, SQRT_FUNCTION_OKAY,
EXP_FUNCTION_OKAY, LDEXP_FUNCTION_OKAY, FREXP_FUNCTION_OKAY and
FMOD_FUNCTION_OKAY have been added to commpn.h
- Documentation comments have been improved in intlib.c, int_rtl.c,
match.c, str_rtl.c, keybd.s7i and vectorfont.s7i.
- In comp/int_act.s7i the variable quotient_name has been renamed to
remainder_name.
20190523:
- In match.c the function substitute_params() has been fixed to copy
parameters with expressions instead of calling do_create(). For
expressions do_create() just creates a reference to the expression
and this leads later to a double free of the expression. Many thanks
go to Anton Lobach, for reporting this error and for providing a test
program.
- The library blowfish.s7i, with Blowfish cipher support, has been
added.
- The functions column() and line() have been added to the library
console.s7i.
- The bas7.sd7 (basic interpreter) example program has been improved.
Support for the keyword ENDIF has been added.
- The compiler (s7c.sd7) has been improved (in set_act.s7i) to optimize
the expression card(bitset(number)).
- The functions toBase and fromBaseToBigInt have been added to
encoding.s7i. This functions encode and decode bigInteger numbers
with a positional numeric system.
- Conversion functions have been added to bitsetof.s7i and bitset.s7i.
- Checks for the function card() have been added to chkset.sd7.
- Interpreter and compiler have been improved to support the actions
CON_COLUMN, CON_LINE, SET_CONV1, SET_CONV3, SET_SCONV1 and
SET_SCONV3. The support for the actions SET_CONV and SET_SCONV has
been removed.
- The libraries bitsetof.s7i and bitset.s7i have been adjusted, to use
the new actions.
- In con_inf.c the function conWrite() has been improved to change the
cursor position, when the characters '\n', '\r' and '\b' are written.
- In con_win.c the function conCursor() has been improved, to hide the
cursor, when it is called with FALSE. The function conOpen() has been
changed, to set the cursor position to (1, 1) and to hide the cursor.
- The functions conColumn() and conLine() have been added to con_rtl.c,
con_inf.c, con_win.c, con_wat.c and con_emc.c.
- In set_rtl.c the functions setIConv() and setSConv() have been
improved. Now setIConv() raises RANGE_ERROR for negative numbers and
setSConv() raises RANGE_ERROR, when a negative integer would be
returned.
- Documentation has been improved in console.s7i, string.s7i,
con_inf.c, con_win.c
- The debug trace mechanism in analyze.c and dcllib.c has been
improved.
- A call of dlerror() has been added in dll_unx.c.
- In traceutl.c the function prot_list_limited() has been introduced.
20190506:
- The utility program bigfiles.sd7 has been added. Bigfiles is an
utility program to search for big files. This is useful, when the
disk is almost full and files must be removed to get more space.
- The utility program sydir7.sd7 has been improved. Now it supports the
option -n, which assures that no changes are done.
- The program db7.sd7 (Database Inspector) has been improved to write
an error message, when reading the catalog of database tables fails.
- The program chkbitdata.sd7 has been added. This program checks
functions from the bitdata.s7i library.
- In the FAQ the explanation, how Seed7 is compiled, has been improved.
- The description of several conversion functions in the manual has
been improved.
- The function ripemd160 has been added to msgdigest.s7i. This function
computes a message digest with the RIPEMD-160 algorithm.
- The functions toBase58, fromBase58, toBase and fromBase have been
added to encoding.s7i. This functions support Base58 encoding and
similar other encodings with a positional numeric system.
- The functions putBitLsb, putBitsLsb, getBitMsb, getBitsMsb, putBitMsb
and putBitsMsb have been added to bitdata.s7i. This functions read
and write bits from and to a file.
- The new library leb128.s7i has been added. This library supports the
conversion of integers to and from LEB128 encoding. LEB128 is a
variable-length encoding for integers. It is used e.g. by the DWARF
debug file format and by WebAssembly.
- Tests for the functions leb128ToInt(), uLeb128ToInt(), leb128() and
uLeb128() have been added to chkint.sd7.
- The library make.s7i has been improved to avoid a makefile rule
recursion.
- The function hex2Bytes has been added to bytedata.s7i. This function
converts a string with hexadecimal digits to a string of bytes.
- The function reverse has been added to string.s7i and seed7_05.s7i.
- The function tableNamesCommand has been added to sql_base.s7i.
- Conversion functions have been added to char.s7i.
- In big_rtl.c the function uBigMult has been changed to be faster,
when the size of factor2 is 1.
- In con_inf.c code to copy the environment for Emscripten and node.js
has been added. This code is deactivated, because of a limitation
in the Emscripten implementations of getenv() and setenv().
- The makefiles have been improved to copy the file version.h to a
name that corresponds to the makefile. E.g.: The makefile
mk_linux.mak copies version.h to vers_linux.h. This helps comparing
different version.h files.
- Documentation has been added to chkccomp.c and read_me.txt.
- The prototype of the function refCatParse has been changed in
ref_data.c, ref_data.h and ref_act.s7i. The compiler (s7c.sd7) has
been changed to add a cast in the function init_set_constants().
In sql_odbc.c casts have been added. This changes avoid C++
compilation errors.
- Calls of logFunction and logError have been added in con_inf.c,
dll_unx.c and dll_win.c.
The 20190711 snapshot did not bring any changes, so we skipped it.
This one brings a backport for Arm and one for dataflow analysis
(plus one for s390).
July 13, 2019. KDE today announces the release of KDE Frameworks 5.60.0.
KDE Frameworks are over 70 addon libraries to Qt which provide a wide variety
of commonly needed functionality in mature, peer reviewed and well tested
libraries with friendly licensing terms.
Announcement:
https://kde.org/announcements/kde-frameworks-5.60.0.php
PR: 239183
Exp-run by: antoine
- Drop pre-install target: `make restage` should be run after a
failed `make stage` to wipe out and repopulate the staging
directory. No need to hack around this.
- Drop RUST_MANIFESTS, it is only one value after r490852 and now
only used once in post-install.
- Drop RUST_CHANNEL. It is only used in do-configure.
- Drop LLNEXTGEN option. There are no references to LLNextgen in
the Rust sources, so it appears to not be used for anything
anymore.
Fix handling of BOOTSTRAPS_SUFFIX. On powerpc64 the -elfv1 suffix
needs to be stripped from the bootstraps since Rust expects them
without it.
PR: 239158
Reported by: pkubaj
Since the test result is positive for 64-bit, switch the order of the
--enable-XYZ-bit definitions, to avoid one more negative in the test.
Approved by: portmgr (tier-2 blanket)
July 11, 2019.
Today KDE released the third stability update for KDE Applications 19.04. This
release contains only bugfixes and translation updates, providing a safe and
pleasant update for everyone.
Over sixty recorded bugfixes include improvements to Kontact, Ark, Cantor, JuK,
K3b, Kdenlive, KTouch, Okular, Umbrello, among others.
Improvements include:
* Konqueror and Kontact no longer crash on exit with QtWebEngine 5.13
* Cutting groups with compositions no longer crashes the Kdenlive video editor
* The Python importer in Umbrello UML designer now handles parameters with default arguments
Changelog:
https://kde.org/announcements/fulllog_applications-aether.php?version=19.04.3
as a stand-in for "are we running on gcc".
For people already testing powerpc on clang, it is possible that they
already have both compilers in base. Thus, the assumption that "gcc is
in base" (e.g. libstdc++.so exists) always means "force use of GCC" is
already broken. It will be for everyone on -CURRENT once the switch is
made.
While here, standardize on compiler:c++11-lang instead of -lib (they are
equivalent these days), pet portlint, and do some other cleanup.
Approved by: portmgr (tier-2 blanket)
LIBAPL option is selected. For some reason, configure script thinks that
libapl.so is wanted when --without-libapl passed down on it.
Reported by: pkg-fallout
- Teach the code to expand tilde (~) to $(HOME) to prevent
spamming every current directory with `.apl.history' file
- Fix some minor C[XX]FLAGS pollution while I'm here
G__cpp_list.cxx: In function 'int G__list_49_0_10(G__value*, const char*, G__param*, int)':
G__cpp_list.cxx:707:109: error: 'std::__cxx11::list<int, std::allocator<int> >::iterator' {aka 'struct std::_List_iterator<int>'} has no member named 'operator=='; did you mean 'operator='?
707 | G__letint(result7, 103, (long) ((list<int,allocator<int> >::iterator*) G__getstructoffset())->operator==(*(list<int,allocator<int> >::iterator*) libp->para[0].ref));
| ^~
| operator=
G__cpp_list.cxx: In function 'int G__list_49_0_11(G__value*, const char*, G__param*, int)':
G__cpp_list.cxx:713:109: error: 'std::__cxx11::list<int, std::allocator<int> >::iterator' {aka 'struct std::_List_iterator<int>'} has no member named 'operator!='; did you mean 'operator='?
713 | G__letint(result7, 103, (long) ((list<int,allocator<int> >::iterator*) G__getstructoffset())->operator!=(*(list<int,allocator<int> >::iterator*) libp->para[0].ref));
| ^~
| operator=
http://pb2.nyi.freebsd.org/data/120i386-default-PR238330/2019-06-09_20h27m22s/logs/errors/cint-5.18.00_12.log
While here make the build abort fast on build errors instead of
carrying on like nothing happened.
PR: 238907
Reported by: antoine (via exp-run in PR 238330)
- Add an XXX comment about hardcoded `math/fftw3' on LIB_DEPENDS
- Convert direct dependency on `libsqlite3.so' to USES+=sqlite:3
PR: 238896 (modified)
Submitted by: pkubaj
Tested on: Mac mini G4
Switch mesa over to use llvm80 instead of llvm60. Make it use the
global LLVM_DEFAULT instead of deciding for ourself which llvm version
to use. [1]
Fix build of lang/beginet [1]
Add patch from upstream to fix build of devel/libclc. The patch is taken
from the git mirror of devel/libclc rather than the SVN repo, for
convenience.
Add a patch from mesa upstream preventing certain error messages when using
amdgpu [2]
Add a notice to bsd.default-versions.mk asking that the graphics team be
informed before the llvm version is changed.
Enable llvm and gallium on MIPS. As far as I can tell, this used to
be the default before this change.
Bump portrevisions since dependencies changed.
PR: 230789 [1], [2]
Submitted by: jbeich [1], tobik [2]
Obtained from: FreeBSD Graphics Team development repo
https://github.com/FreeBSDDesktop/freebsd-ports/commits/feature/mesa-llvm80
Sponsored by: B3 Init (zeising)
Python 3.5 is currently failing to build the pickle module on GCC-based
architectures, with the following (several) errors:
error: 'for' loop initial declaration used outside C99 mode
This causes packaging to fail, as the pickle module filename changes on
failure to build, so the plist ends up incorrect
Python 3.6+ switched to using -std=c99 [1][2], but the changes were not
backported to 3.5
[1] https://bugs.python.org/issue28017
[2] https://hg.python.org/cpython/rev/b5b2bb56d303
[3] https://hg.python.org/cpython/rev/91017e2202ae
PR: 238821
Reviewed by: koobs (python)
Approved by: koobs (python), mat (mentor)
MFH: 2019Q2 (blanket: build fix)
Differential Revision: https://reviews.freebsd.org/D20778
ports to build against it. Most changes are rather minor and mechanical
except for the devel/gdb (obtained via their bugtracker [1], courtesy of
Doug Evans). One port (science/meep) I had to mark BROKEN after fixing
it proved to be very tedious and actually unreliable. It is very old,
there are newer versions available so it should be fixed by updating.
One port (devel/libruin) had revealed a bug in the new Guile code (an
auxiliary script, really) that had to be worked-round; reference to the
problematic upstream commit is provided in the patch.
PR: 229613
Exp-run by: antoine
[1] https://sourceware.org/bugzilla/show_bug.cgi?id=21104#c8
are unsafe by default, which is the main motivation why it was picked,
but not the very latest one) and synchronize the rest of the stack and
dependent ports with it, particularly:
- Update `devel/ocaml-ocamlbuild' to version 0.14.0 and unbreak,
register build dependency on all ports that require it (should
be part of USE_OCAML, but we do not want to make any Mk-related
changes the for time being)
- Update `devel/ocaml-camlp4' to version 4.05+2
- Update `devel/ocaml-camlp5' to version 7.07 (the project had
moved to GitHub)
- Mark `devel/ocaml-deriving-ocsigen' as BROKEN for now, it is
very outdated and requires quite a lot of work
- Update `x11-toolkits/ocaml-labltk' to version 8.06.3
PR: 218333
Exp-run by: antoine
A development snapshot of lang/go. This port is intended to be
used by port maintainers for testing with future Go versions.
PR: 238374
Submitted by: dg@syrec.org
these older versions of GCC - GCC 4.8, GCC 5, and GCC 6 - which have
been end-of-lifed upstream many moons ago. GCC 8 has been the default
version of GCC in the Ports Collection for a while and as such proven
itself, plus of all versions it is most likely to be present/used.
No functional change, just updated advice to our users.
Traceback (most recent call last):
File "scripts/python/make-dist.py", line 294, in <module>
Setup(InstallRoot_CompilerWithPrevious, InstallRoot_CompilerWithSelf)
File "scripts/python/make-dist.py", line 268, in Setup
reload(pylib) or FatalError()
File "/wrkdirs/usr/ports/lang/modula3/work/cm3-b2ce705/scripts/python/pylib.py", line 655, in <module>
if Host.endswith("_NT") or Host == "NT386":
AttributeError: 'NoneType' object has no attribute 'endswith'
Reported by: pkg-fallout
MFH: 2019Q2
Tcl/Tk 8.5 is approaching EOL. It might or might get another patch release with
8.7 is released, but people should have started migrating to 8.6 long ago. See
also the second paragraph in the last 8.5 release announcement from three years
ago here: https://code.activestate.com/lists/tcl-core/15413/
For now, I don't have an EXPIRATION_DATE.
Replace USE_GCC=any with USE_GCC=yes.
New GCC is now needed:
../utils/bitsetUtils.hh:72: error: 'const class std::bitset<64u>' has no member named 'all'
Approved by: mat (mentor)
Differential Revision: https://reviews.freebsd.org/D20602
Eliminate LINUXNAME from port Makefiles. This was just a helper variable
without special meaning outside port Makefiles but several developers have
copied it to new ports where it was then unused, apparently thinking that
it did have some special meaning.
https://gcc.gnu.org/gcc-9/changes.html has a comprehensive overview of
many improvements and changes and https://gcc.gnu.org/gcc-8/porting_to.html
addresses issues you may encounter porting to this new version, though
this release series should have fewer of those than previous ones.
To provide a brief overview of some of the more noticable changes:
GCC's diagnostics now print source code with a left margin showing line
numbers. This is configurable via -fno-diagnostics-show-line-numbers.
Plus there have been lots of further improvements around diagnostic
messages in general as -fopt-info.
As usual a large number of improvements to code generation, including
but by far not limited to the following:
- Switch expansion (into expressions).
- Inliner defaults are tuned to better suit modern C++ codebases,
especially when built with link time optimizations.
- Hot/cold partitioning is now more precise and aggressive.
- Improved scalability for very large translation units.
- Link-time optimization improvements including faster compilation.
A new option -flive-patching=[inline-only-static|inline-clone] has
been introduced to provide a safe compilation for live-patching.
A new pair of profiling options -fprofile-filter-files and
-fprofile-exclude-files help filter which source files are instrumented.
New built-in functions __builtin_expect_with_probability,
__builtin_has_attribute, and __builtin_speculation_safe_value.
Significant effort has been put into refining existing compiler warnings
and adding additional diagnostics. One notable addition is -Wabsolute-value
which warns for calls to standard functions that compute the absolute value
of an argument when a more appropriate standard function is available. For
example, calling abs(3.14) warns because the appropriate function to
compute the absolute value of a double argument is fabs.
The spelling corrector now considers transposed letters, and the threshold
for similarity has been tightened, to avoid nonsensical suggestions.
A new option --completion provides better option completion in a shell
(such as bash).
OpenACC support in C, C++, and Fortran continues to be maintained and
improved. Most of the OpenACC 2.5 specification is implemented.
Version 5.0 of the OpenMP specification is now partially supported in
the C and C++ compilers.
There is now experimental support for the upcoming C2X revision of the
ISO C standard (via the -std=c2x and similar options).
The C++ front end has experimental support for some of the upcoming
C++2a draft features, enabled by the -std=c++2a or -std=gnu++2a options.
This includes range-based for statements with initializer, default
constructible and assignable stateless lambdas, lambdas in unevaluated
contexts, language support for empty data members, allowing pack expansion
in lambda init-capture, likely and unlikely attributes, class types in
non-type template parameters, allowing virtual function calls in constant
expressions, explicit(bool), std::is_constant_evaluated, nested inline
namespaces, etc.
The C++17 implementation is no longer experimental and parallel algorithms
and <execution> and <memory_resource> are available. Using the types and
functions in <filesystem> does not require linking with -lstdc++fs any more.
On the Fortran side asynchronous I/O is now fully supported; FINDLOC and
IS_CONTIGUOUS and other intrinsics have been implemented.
The MAX and MIN intrinsics are no longer guaranteed to return any
particular value in case one of the arguments is a NaN. This conforms
with the Fortran standard and what other Fortran compilers do.
A new option -fdec-include, set also by -fdec, has been added for
compatibility with legacy code. With this option, the INCLUDE directive
is parsed also as a statement, which allows it to be written on multiple
source lines with line continuations.
Support for the Cell Broadband Engine (SPU), and thus powerpcspe on
FreeBSD as well, has been removed for lack of upstream maintainership.
Also there's been a minor ABI change on arm* targets (that GCC warns
about by default, controlled by the -Wpsabi option).
Support for the D programming language has been added to GCC, implementing
version 2.076 of the language and run-time library, though this port does
not enable this yet. Volunteers welcome to test and contribute.
Remove OPTIONS support from library Haskell ports.
Do not install documentation by library Haskell ports.
Remove deprecation notice from library ports, that still needed.
PR: 224083
Approved by: tcberner (mentor)
Differential Revision: https://reviews.freebsd.org/D20247
- Add support for CORBA applications that were removed from recent
releases, and enable them by default as they were before. They follow a
separate GH_TAGNAME.
- Remove obsolete GS application.
- SMP is now enabled by default.
lang/erlang-doc, lang/erlang-man: upgrade to 21.3.
- Add missing NO_ARCH.
Differential Revision: https://reviews.freebsd.org/D19911
/usr/local/lib/ruby/site_ruby/2.5/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (1.13.6) required by your /wrkdirs/usr/ports/lang/rubinius/work/rubinius-3.86/Gemfile.lock. (Gem::GemNotFoundException)
Reported by: pkg-fallout
Proactively add a CONFLICTS statement with the lang/gcc9 port that
should be landing any day now. That'll avoid a PORTREVISION bump
and rebuild at that point.
bin/lto-dump which may be helpful if you employ link-time optimization (LTO).
Forward port r499061 | gerald | 2019-04-15 from lang/gcc8 and gcc8-devel [1]:
GCC has two runtime libraries: The static library libgcc.a (-lgcc) and
the shared library libgcc_s.so (-lgcc_s). Both implement many of the
same functions but they also each have their unique functions. When
GCC links programs and libraries there are three possibilities:
1. gcc -static-libgcc or gcc -static: -lgcc
=> Just use libgcc.a.
2. gcc -shared-libgcc: -lgcc_s -lgcc
=> Link with libgcc_s first, so libgcc.a is only used for its unique
functions.
3. gcc: -lgcc -Wl,--as-needed -lgcc_s -Wl,--no-as-needed
=> Link with libgcc.a first so libgcc_s is only used for its unique
functions (_Unwind_* functions).
Approach 3 is the default for gcc and it's also what clang and clang++ use;
approach 2 is the default for gfortran, g++ and probably other front ends.
This patch makes 3 the default for gfortran. It significantly reduces
the use of libgcc_s. The _Unwind_* functions are also available in the
old base system libgcc_s which means this reduces the need for
-rpath /usr/local/lib/gccN in ports that depend on libraries built with
gfortran. Consider a dependency tree like this:
prog -> libA -> libgcc_s (old base system libgcc_s is fine)
-> libB -> libgcc_s (libB built with gfortran, needs new libgcc_s)
Here prog needs to be linked with -rpath /usr/local/lib/gccN even if it's
a normal C program compiled with clang. Without -rpath it will fail to
start because it loads old libgcc_s first as a dependency of libA and then
it fails to load libB. With this patch libB works with old base system
libgcc_s or may not need libgcc_s at all, so prog does not need to be
linked with -rpath.
PR: 208120 [1]
Submitted by: tijl [1]