Bug 45326 - gmp's use of C99 keeps breaking my compiles, suggest set autoconf variables to avoid inttypes/stdint
Summary: gmp's use of C99 keeps breaking my compiles, suggest set autoconf variables t...
Status: WAITING
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.5.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-18 21:26 UTC by Jay
Modified: 2016-10-03 06:03 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2016-10-03 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jay 2010-08-18 21:26:43 UTC
I seem to keep running into inttypes.h/stdint.h that aren't quite adequate, esp. for gmp. For example, in mpfr:


https://gforge.inria.fr/scm/viewvc.php/trunk/get_uj.c?view=log&root=mpfr&pathrev=7083#rev7082


Anyway, I suggest this to reduce the problem:


bash-4.1$ diff -u Makefile.in.orig Makefile.in
--- Makefile.in.orig	2010-08-18 11:33:42 -0700
+++ Makefile.in	2010-08-18 11:33:13 -0700
@@ -16308,7 +16308,7 @@
 	libsrcdir="$$s/gmp"; \
 	$(SHELL) $${libsrcdir}/configure \
 	  $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
-	  --target=none-${host_vendor}-${host_os} $${srcdiroption} --disable-shared \
+	  --target=none-${host_vendor}-${host_os} $${srcdiroption} --disable-shared ac_cv_header_inttypes_h=no ac_cv_header_stdint_h=no \
 	  || exit 1
 @endif gmp

Slightly tested.
I tried setting the ac_* variables around the entire gcc configure but that broke's libiberty's use of intptr_t.
Comment 1 Jay 2010-08-18 21:27:20 UTC
example error:

file included from /home/jayk/src/gcc-4.5.1/gmp/assert.c:27:0:
/home/jayk/src/gcc-4.5.1/gmp/gmp-impl.h:188:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'gmp_uint_least32_t'
In file included from /home/jayk/src/gcc-4.5.1/gmp/assert.c:27:0:
/home/jayk/src/gcc-4.5.1/gmp/gmp-impl.h:3413:7: error: expected specifier-qualifier-list before 'gmp_uint_least32_t'
Comment 2 Ralf Wildenhues 2010-10-02 14:52:12 UTC
Author: rwild
Date: Sat Oct  2 14:52:07 2010
New Revision: 164904

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164904
Log:
Allow to pass separate configure arguments for build, host and target.

/:
	PR bootstrap/45326
	PR bootstrap/45174
	* configure.ac: Honor initial values of $build_configargs,
	$host_configargs, $target_configargs.  Mark the precious, so
	environment settings get recorded.
	* configure: Regenerate.

gcc/:
	* doc/install.texi (Configuration): Document build_configargs,
	host_configargs, target_configargs.

Modified:
    trunk/ChangeLog
    trunk/configure
    trunk/configure.ac
    trunk/gcc/ChangeLog
    trunk/gcc/doc/install.texi
Comment 3 Andrew Pinski 2016-10-03 06:03:06 UTC
Does this work with a newer GCC?