On Wed, Oct 19, 2022 at 11:30:59AM +0200, Florian Weimer wrote:
> I'm going to push a branch to dist-git for very few packages (so far gcc
> and redhat-rpm-config) which will be used by COPR builds to port Fedora
> to C99 and later language standards.
> 
> GCC 14 is expected to reject certain constructs that were removed from C
> in C99:

If we're changing defaults, could we make -fPIC the default and have
-fno-pic be an explicit choice?

Finding every place in the OCaml toolchain that passes flags to the
compiler is very tedious, I had another bug filed about it only a few
days ago.  This would all go away if -fPIC was simply the default.
AIUI on x86-64 because of rip-relative addressing there's no serious
penalty.

Rich.

>   * implicit function declarations
>   * implicit ints
>   * implicit conversion between pointers and int
>     (that may not have been in C89 even; details still pending)
> 
> It's possible to build with -std=gnu89 or -std=c89 to re-enable these
> constructs, or fix the sources not to use them.  Implicit function
> declarations in particular have wasted countless programmer hours due to
> difficult-to-track-down ABI mismatches, so it's definitely desirable to
> cause them to fail the build.
> 
> We have tooling that identifies these constructs if GCC is used, even if
> they are used in configure check.  Unexpected failures in configure
> checks can be tricky because if the package is well-written, the end
> result is still a consistent build with some expected failures missing,
> corresponding testsuite bits disabled etc.
> 
> We will contribute fixes upstream and to rawhide, either by fixing the
> sources or switch to C89 mode where it is unlikely source changes will
> be acceptable to upstream.  The c99-port dist-git branch will only be
> used for our support tooling that should not be used by production
> builds in the rawhide buildroot.  As this is necessarily a
> cross-distribution effort, there will be some tracking mechanism to
> record and share patches for which no active upstream exists anymore.
> 
> C++ packages are only affected in so far as they use the C compiler in
> configure checks: these constructs haven't been part of C++ for a long,
> long time and may not have been implemented in G++, ever.
> 
> I hope to submit a formal Fedora 40 change proposal after some initial
> experiments.
> 
> Thanks,
> Florian
> _______________________________________________
> devel mailing list -- devel@lists.fedoraproject.org
> To unsubscribe send an email to devel-le...@lists.fedoraproject.org
> Fedora Code of Conduct: 
> https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: 
> https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
> Do not reply to spam, report it: 
> https://pagure.io/fedora-infrastructure/new_issue

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to