unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* gcc-4.7.4: libgcc2.h:157: error: unable to emulate 'TF'
@ 2018-07-09 16:57 Jan Nieuwenhuizen
  2018-07-09 18:28 ` U.Mutlu
  2018-07-10 15:54 ` Danny Milosavljevic
  0 siblings, 2 replies; 13+ messages in thread
From: Jan Nieuwenhuizen @ 2018-07-09 16:57 UTC (permalink / raw)
  To: gcc-help; +Cc: guix-devel

Hi!

I'm working on a full source bootstrap for a GNU system, GuixSD in
particular.  With the Mes 0.16 release I thought it was done, but now it
seems I'm stuck.

Using the MesCC C99 compiler written in Guile Scheme, I compiled tcc-0.9.26
and a tiny Mes C library, barely enough to build

    binutils-2.20.1, gcc-2.95.3, and glibc-2.2.5

Using those tools, I built

    binutils-2.20.1, gcc-4.1.0, and glibc-2.3.6

My attempts to build gcc-4.7.4 are failing, the most common error that I
get is

     i386-unknown-linux-gcc --sysroot=/gnu/store/jdjpfzjr2zf3xbf7ssl11ljwpq7spid8-glibc-mesboot-2.3.6/include   -g -O2 -O2  -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fpic -g -DIN_LIBGCC2 -fno-stack-protector   -fpic -I. -I. -I../../host-i386-unknown-linux/gcc -I../.././libgcc -I../.././libgcc/. -I../.././libgcc/../gcc -I../.././libgcc/../include  -DHAVE_CC_TLS  -DUSE_TLS -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c ../.././libgcc/libgcc2.c 
     In file included from ../.././libgcc/libgcc2.c:58:
     ../.././libgcc/libgcc2.h:157: error: unable to emulate 'TF'
     ../.././libgcc/libgcc2.h:158: error: unable to emulate 'TC'
     ../.././libgcc/libgcc2.h:161: error: unknown machine mode 'libgcc_cmp_return'
     ../.././libgcc/libgcc2.h:162: error: unknown machine mode 'libgcc_shift_count'
     ../.././libgcc/libgcc2.h:372: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__muldi3'
     ../.././libgcc/libgcc2.h:373: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__divdi3'
     ../.././libgcc/libgcc2.h:374: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__udivdi3'
     ../.././libgcc/libgcc2.h:375: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__umoddi3'
     ../.././libgcc/libgcc2.h:376: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__moddi3'
     ...

Gcc-4.7.4 advertises it can be built with gcc-2.95 and binutils-2.13.1
and glibc-2.2.5.

Since mes 0.16 was released two weeks ago I have tried many things, but
not knowing where this error comes makes progress difficult, e.g.: I
didn't manage to compile any glibc > 2.3.6, but that may not be
necessary?

Greetings,
janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcc-4.7.4: libgcc2.h:157: error: unable to emulate 'TF'
  2018-07-09 16:57 gcc-4.7.4: libgcc2.h:157: error: unable to emulate 'TF' Jan Nieuwenhuizen
@ 2018-07-09 18:28 ` U.Mutlu
  2018-07-09 19:40   ` Jan Nieuwenhuizen
  2018-07-10 15:54 ` Danny Milosavljevic
  1 sibling, 1 reply; 13+ messages in thread
From: U.Mutlu @ 2018-07-09 18:28 UTC (permalink / raw)
  To: Jan Nieuwenhuizen, gcc-help; +Cc: guix-devel

Jan Nieuwenhuizen wrote on 07/09/2018 06:57 PM:
> Hi!
>
> I'm working on a full source bootstrap for a GNU system, GuixSD in
> particular.  With the Mes 0.16 release I thought it was done, but now it
> seems I'm stuck.
>
> Using the MesCC C99 compiler written in Guile Scheme, I compiled tcc-0.9.26
> and a tiny Mes C library, barely enough to build
>
>      binutils-2.20.1, gcc-2.95.3, and glibc-2.2.5
>
> Using those tools, I built
>
>      binutils-2.20.1, gcc-4.1.0, and glibc-2.3.6
>
> My attempts to build gcc-4.7.4 are failing, the most common error that I
> get is
>
>       i386-unknown-linux-gcc --sysroot=/gnu/store/jdjpfzjr2zf3xbf7ssl11ljwpq7spid8-glibc-mesboot-2.3.6/include   -g -O2 -O2  -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fpic -g -DIN_LIBGCC2 -fno-stack-protector   -fpic -I. -I. -I../../host-i386-unknown-linux/gcc -I../.././libgcc -I../.././libgcc/. -I../.././libgcc/../gcc -I../.././libgcc/../include  -DHAVE_CC_TLS  -DUSE_TLS -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c ../.././libgcc/libgcc2.c
>       In file included from ../.././libgcc/libgcc2.c:58:
>       ../.././libgcc/libgcc2.h:157: error: unable to emulate 'TF'
>       ../.././libgcc/libgcc2.h:158: error: unable to emulate 'TC'
>       ../.././libgcc/libgcc2.h:161: error: unknown machine mode 'libgcc_cmp_return'
>       ../.././libgcc/libgcc2.h:162: error: unknown machine mode 'libgcc_shift_count'
>       ../.././libgcc/libgcc2.h:372: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__muldi3'
>       ../.././libgcc/libgcc2.h:373: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__divdi3'
>       ../.././libgcc/libgcc2.h:374: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__udivdi3'
>       ../.././libgcc/libgcc2.h:375: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__umoddi3'
>       ../.././libgcc/libgcc2.h:376: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__moddi3'
>       ...
>
> Gcc-4.7.4 advertises it can be built with gcc-2.95 and binutils-2.13.1
> and glibc-2.2.5.
>
> Since mes 0.16 was released two weeks ago I have tried many things, but
> not knowing where this error comes makes progress difficult, e.g.: I
> didn't manage to compile any glibc > 2.3.6, but that may not be
> necessary?


What do you get if you grep for "error: " in the xxx/libgcc/config.log under 
the builddir?
It would also be helpful if you could post also your libiberty/config.h

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcc-4.7.4: libgcc2.h:157: error: unable to emulate 'TF'
  2018-07-09 18:28 ` U.Mutlu
@ 2018-07-09 19:40   ` Jan Nieuwenhuizen
  2018-07-10  3:52     ` U.Mutlu
  0 siblings, 1 reply; 13+ messages in thread
From: Jan Nieuwenhuizen @ 2018-07-09 19:40 UTC (permalink / raw)
  To: U.Mutlu; +Cc: gcc-help, guix-devel

[-- Attachment #1: Type: text/plain, Size: 1121 bytes --]

U.Mutlu writes:

> What do you get if you grep for "error: " in the xxx/libgcc/config.log
> under the builddir?

janneke@guix-x86 /tmp/guix-build-gcc-mesboot-4.7.4.drv-0/gcc-4.7.4$ grep 'error: ' i386-unknown-linux/libgcc/config.log
conftest.c:9:28: error: ac_nonexistent.h: No such file or directory
conftest.c:13: error: size of array 'test_array' is negative
conftest.c:13: error: size of array 'test_array' is negative
conftest.c:13: error: size of array 'test_array' is negative
conftest.c:13: error: size of array 'test_array' is negative
conftest.c:14: error: size of array 'test_array' is negative
conftest.c:14: error: size of array 'test_array' is negative
conftest.c:14: error: size of array 'test_array' is negative
conftest.c:14: error: size of array 'test_array' is negative
conftest.c:14: error: size of array 'test_array' is negative
conftest.c:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'x'
conftest.c:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '_Fract'

> It would also be helpful if you could post also your libiberty/config.h

Sure, attached.

janneke


[-- Attachment #2: build-i686-pc-linux-gnu--libiberty--config.h --]
[-- Type: application/octet-stream, Size: 14217 bytes --]

/* config.h.  Generated from config.in by configure.  */
/* config.in.  Generated from configure.ac by autoheader.  */

/* Define if building universal (internal helper macro) */
/* #undef AC_APPLE_UNIVERSAL_BUILD */

/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
   This function is required for alloca.c support on those systems. */
/* #undef CRAY_STACKSEG_END */

/* Define to 1 if you have the <alloca.h> header file. */
#define HAVE_ALLOCA_H 1

/* Define to 1 if you have the `asprintf' function. */
#define HAVE_ASPRINTF 1

/* Define to 1 if you have the `atexit' function. */
#define HAVE_ATEXIT 1

/* Define to 1 if you have the `basename' function. */
#define HAVE_BASENAME 1

/* Define to 1 if you have the `bcmp' function. */
#define HAVE_BCMP 1

/* Define to 1 if you have the `bcopy' function. */
#define HAVE_BCOPY 1

/* Define to 1 if you have the `bsearch' function. */
#define HAVE_BSEARCH 1

/* Define to 1 if you have the `bzero' function. */
#define HAVE_BZERO 1

/* Define to 1 if you have the `calloc' function. */
#define HAVE_CALLOC 1

/* Define to 1 if you have the `canonicalize_file_name' function. */
#define HAVE_CANONICALIZE_FILE_NAME 1

/* Define to 1 if you have the `clock' function. */
#define HAVE_CLOCK 1

/* Define to 1 if you have the declaration of `asprintf', and to 0 if you
   don't. */
#define HAVE_DECL_ASPRINTF 0

/* Define to 1 if you have the declaration of `basename(char *)', and to 0 if
   you don't. */
#define HAVE_DECL_BASENAME 0

/* Define to 1 if you have the declaration of `calloc', and to 0 if you don't.
   */
#define HAVE_DECL_CALLOC 1

/* Define to 1 if you have the declaration of `ffs', and to 0 if you don't. */
#define HAVE_DECL_FFS 1

/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
   */
#define HAVE_DECL_GETENV 1

/* Define to 1 if you have the declaration of `getopt', and to 0 if you don't.
   */
#define HAVE_DECL_GETOPT 1

/* Define to 1 if you have the declaration of `malloc', and to 0 if you don't.
   */
#define HAVE_DECL_MALLOC 1

/* Define to 1 if you have the declaration of `realloc', and to 0 if you
   don't. */
#define HAVE_DECL_REALLOC 1

/* Define to 1 if you have the declaration of `sbrk', and to 0 if you don't.
   */
#define HAVE_DECL_SBRK 1

/* Define to 1 if you have the declaration of `snprintf', and to 0 if you
   don't. */
#define HAVE_DECL_SNPRINTF 1

/* Define to 1 if you have the declaration of `strverscmp', and to 0 if you
   don't. */
#define HAVE_DECL_STRVERSCMP 0

/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you
   don't. */
#define HAVE_DECL_VASPRINTF 0

/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you
   don't. */
#define HAVE_DECL_VSNPRINTF 1

/* Define to 1 if you have the `dup3' function. */
/* #undef HAVE_DUP3 */

/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1

/* Define to 1 if you have the `ffs' function. */
#define HAVE_FFS 1

/* Define to 1 if you have the `fork' function. */
#define HAVE_FORK 1

/* Define to 1 if you have the `getcwd' function. */
#define HAVE_GETCWD 1

/* Define to 1 if you have the `getpagesize' function. */
#define HAVE_GETPAGESIZE 1

/* Define to 1 if you have the `getrlimit' function. */
#define HAVE_GETRLIMIT 1

/* Define to 1 if you have the `getrusage' function. */
#define HAVE_GETRUSAGE 1

/* Define to 1 if you have the `getsysinfo' function. */
/* #undef HAVE_GETSYSINFO */

/* Define to 1 if you have the `gettimeofday' function. */
#define HAVE_GETTIMEOFDAY 1

/* Define to 1 if you have the `index' function. */
#define HAVE_INDEX 1

/* Define to 1 if you have the `insque' function. */
#define HAVE_INSQUE 1

/* Define to 1 if the system has the type `intptr_t'. */
#define HAVE_INTPTR_T 1

/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1

/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1

/* Define to 1 if you have the <machine/hal_sysinfo.h> header file. */
/* #undef HAVE_MACHINE_HAL_SYSINFO_H */

/* Define to 1 if you have the <malloc.h> header file. */
#define HAVE_MALLOC_H 1

/* Define to 1 if you have the `memchr' function. */
#define HAVE_MEMCHR 1

/* Define to 1 if you have the `memcmp' function. */
#define HAVE_MEMCMP 1

/* Define to 1 if you have the `memcpy' function. */
#define HAVE_MEMCPY 1

/* Define to 1 if you have the `memmem' function. */
#define HAVE_MEMMEM 1

/* Define to 1 if you have the `memmove' function. */
#define HAVE_MEMMOVE 1

/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1

/* Define to 1 if you have the `memset' function. */
#define HAVE_MEMSET 1

/* Define to 1 if you have the `mkstemps' function. */
/* #undef HAVE_MKSTEMPS */

/* Define to 1 if you have a working `mmap' system call. */
#define HAVE_MMAP 1

/* Define to 1 if you have the `on_exit' function. */
#define HAVE_ON_EXIT 1

/* Define to 1 if you have the <process.h> header file. */
/* #undef HAVE_PROCESS_H */

/* Define to 1 if you have the `psignal' function. */
#define HAVE_PSIGNAL 1

/* Define to 1 if you have the `pstat_getdynamic' function. */
/* #undef HAVE_PSTAT_GETDYNAMIC */

/* Define to 1 if you have the `pstat_getstatic' function. */
/* #undef HAVE_PSTAT_GETSTATIC */

/* Define to 1 if you have the `putenv' function. */
#define HAVE_PUTENV 1

/* Define to 1 if you have the `random' function. */
#define HAVE_RANDOM 1

/* Define to 1 if you have the `realpath' function. */
#define HAVE_REALPATH 1

/* Define to 1 if you have the `rename' function. */
#define HAVE_RENAME 1

/* Define to 1 if you have the `rindex' function. */
#define HAVE_RINDEX 1

/* Define to 1 if you have the `sbrk' function. */
#define HAVE_SBRK 1

/* Define to 1 if you have the `setenv' function. */
#define HAVE_SETENV 1

/* Define to 1 if you have the `setproctitle' function. */
/* #undef HAVE_SETPROCTITLE */

/* Define to 1 if you have the `setrlimit' function. */
#define HAVE_SETRLIMIT 1

/* Define to 1 if you have the `sigsetmask' function. */
#define HAVE_SIGSETMASK 1

/* Define to 1 if you have the `snprintf' function. */
#define HAVE_SNPRINTF 1

/* Define to 1 if you have the `spawnve' function. */
/* #undef HAVE_SPAWNVE */

/* Define to 1 if you have the `spawnvpe' function. */
/* #undef HAVE_SPAWNVPE */

/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1

/* Define to 1 if you have the <stdio_ext.h> header file. */
#define HAVE_STDIO_EXT_H 1

/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1

/* Define to 1 if you have the `stpcpy' function. */
#define HAVE_STPCPY 1

/* Define to 1 if you have the `stpncpy' function. */
#define HAVE_STPNCPY 1

/* Define to 1 if you have the `strcasecmp' function. */
#define HAVE_STRCASECMP 1

/* Define to 1 if you have the `strchr' function. */
#define HAVE_STRCHR 1

/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1

/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1

/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1

/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1

/* Define to 1 if you have the `strncasecmp' function. */
#define HAVE_STRNCASECMP 1

/* Define to 1 if you have the `strndup' function. */
#define HAVE_STRNDUP 1

/* Define to 1 if you have the `strrchr' function. */
#define HAVE_STRRCHR 1

/* Define to 1 if you have the `strsignal' function. */
#define HAVE_STRSIGNAL 1

/* Define to 1 if you have the `strstr' function. */
#define HAVE_STRSTR 1

/* Define to 1 if you have the `strtod' function. */
#define HAVE_STRTOD 1

/* Define to 1 if you have the `strtol' function. */
#define HAVE_STRTOL 1

/* Define to 1 if you have the `strtoul' function. */
#define HAVE_STRTOUL 1

/* Define to 1 if you have the `strverscmp' function. */
#define HAVE_STRVERSCMP 1

/* Define to 1 if you have the `sysconf' function. */
#define HAVE_SYSCONF 1

/* Define to 1 if you have the `sysctl' function. */
#define HAVE_SYSCTL 1

/* Define to 1 if you have the `sysmp' function. */
/* #undef HAVE_SYSMP */

/* Define if you have the sys_errlist variable. */
#define HAVE_SYS_ERRLIST 1

/* Define to 1 if you have the <sys/file.h> header file. */
#define HAVE_SYS_FILE_H 1

/* Define to 1 if you have the <sys/mman.h> header file. */
#define HAVE_SYS_MMAN_H 1

/* Define if you have the sys_nerr variable. */
#define HAVE_SYS_NERR 1

/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1

/* Define to 1 if you have the <sys/prctl.h> header file. */
#define HAVE_SYS_PRCTL_H 1

/* Define to 1 if you have the <sys/pstat.h> header file. */
/* #undef HAVE_SYS_PSTAT_H */

/* Define to 1 if you have the <sys/resource.h> header file. */
#define HAVE_SYS_RESOURCE_H 1

/* Define if you have the sys_siglist variable. */
#define HAVE_SYS_SIGLIST 1

/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1

/* Define to 1 if you have the <sys/sysctl.h> header file. */
#define HAVE_SYS_SYSCTL_H 1

/* Define to 1 if you have the <sys/sysinfo.h> header file. */
#define HAVE_SYS_SYSINFO_H 1

/* Define to 1 if you have the <sys/sysmp.h> header file. */
/* #undef HAVE_SYS_SYSMP_H */

/* Define to 1 if you have the <sys/systemcfg.h> header file. */
/* #undef HAVE_SYS_SYSTEMCFG_H */

/* Define to 1 if you have the <sys/table.h> header file. */
/* #undef HAVE_SYS_TABLE_H */

/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1

/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1

/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
#define HAVE_SYS_WAIT_H 1

/* Define to 1 if you have the `table' function. */
/* #undef HAVE_TABLE */

/* Define to 1 if you have the `times' function. */
#define HAVE_TIMES 1

/* Define to 1 if you have the <time.h> header file. */
#define HAVE_TIME_H 1

/* Define to 1 if you have the `tmpnam' function. */
#define HAVE_TMPNAM 1

/* Define if you have the \`uintptr_t' type. */
#define HAVE_UINTPTR_T 1

/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1

/* Define to 1 if you have the `vasprintf' function. */
#define HAVE_VASPRINTF 1

/* Define to 1 if you have the `vfork' function. */
#define HAVE_VFORK 1

/* Define to 1 if you have the <vfork.h> header file. */
/* #undef HAVE_VFORK_H */

/* Define to 1 if you have the `vfprintf' function. */
#define HAVE_VFPRINTF 1

/* Define to 1 if you have the `vprintf' function. */
#define HAVE_VPRINTF 1

/* Define to 1 if you have the `vsprintf' function. */
#define HAVE_VSPRINTF 1

/* Define to 1 if you have the `wait3' function. */
#define HAVE_WAIT3 1

/* Define to 1 if you have the `wait4' function. */
#define HAVE_WAIT4 1

/* Define to 1 if you have the `waitpid' function. */
#define HAVE_WAITPID 1

/* Define to 1 if `fork' works. */
#define HAVE_WORKING_FORK 1

/* Define to 1 if `vfork' works. */
#define HAVE_WORKING_VFORK 1

/* Define to 1 if you have the `_doprnt' function. */
/* #undef HAVE__DOPRNT */

/* Define if you have the _system_configuration variable. */
/* #undef HAVE__SYSTEM_CONFIGURATION */

/* Define to 1 if you have the `__fsetlocking' function. */
#define HAVE___FSETLOCKING 1

/* Define if canonicalize_file_name is not declared in system header files. */
#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1

/* Define if errno must be declared even when <errno.h> is included. */
/* #undef NEED_DECLARATION_ERRNO */

/* Define to 1 if your C compiler doesn't accept -c and -o together. */
/* #undef NO_MINUS_C_MINUS_O */

/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""

/* Define to the full name of this package. */
#define PACKAGE_NAME ""

/* Define to the full name and version of this package. */
#define PACKAGE_STRING ""

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME ""

/* Define to the home page for this package. */
#define PACKAGE_URL ""

/* Define to the version of this package. */
#define PACKAGE_VERSION ""

/* The size of `int', as computed by sizeof. */
#define SIZEOF_INT 4

/* Define if you know the direction of stack growth for your system; otherwise
   it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows
   toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses
   STACK_DIRECTION = 0 => direction of growth unknown */
#define STACK_DIRECTION -1

/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1

/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1

/* Define to an unsigned 64-bit type available in the compiler. */
#define UNSIGNED_64BIT_TYPE uint64_t

/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
   significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
#  define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
/* #  undef WORDS_BIGENDIAN */
# endif
#endif

/* Number of bits in a file offset, on hosts where this is settable. */
#define _FILE_OFFSET_BITS 64

/* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */

/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */

/* Define to `__inline__' or `__inline' if that's what the C compiler
   calls it, or to nothing if 'inline' is not supported under any name.  */
#ifndef __cplusplus
/* #undef inline */
#endif

/* Define to the type of a signed integer type wide enough to hold a pointer,
   if such a type exists, and if the system does not define it. */
/* #undef intptr_t */

/* Define to `int' if <sys/types.h> does not define. */
/* #undef pid_t */

/* Define to `int' if <sys/types.h> does not define. */
/* #undef ssize_t */

/* Define to the type of an unsigned integer type wide enough to hold a
   pointer, if such a type exists, and if the system does not define it. */
/* #undef uintptr_t */

/* Define as `fork' if `vfork' does not work. */
/* #undef vfork */

[-- Attachment #3: host-i386-unknown-linux--libiberty--config.h --]
[-- Type: application/octet-stream, Size: 14219 bytes --]

/* config.h.  Generated from config.in by configure.  */
/* config.in.  Generated from configure.ac by autoheader.  */

/* Define if building universal (internal helper macro) */
/* #undef AC_APPLE_UNIVERSAL_BUILD */

/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
   This function is required for alloca.c support on those systems. */
/* #undef CRAY_STACKSEG_END */

/* Define to 1 if you have the <alloca.h> header file. */
#define HAVE_ALLOCA_H 1

/* Define to 1 if you have the `asprintf' function. */
#define HAVE_ASPRINTF 1

/* Define to 1 if you have the `atexit' function. */
#define HAVE_ATEXIT 1

/* Define to 1 if you have the `basename' function. */
#define HAVE_BASENAME 1

/* Define to 1 if you have the `bcmp' function. */
#define HAVE_BCMP 1

/* Define to 1 if you have the `bcopy' function. */
#define HAVE_BCOPY 1

/* Define to 1 if you have the `bsearch' function. */
#define HAVE_BSEARCH 1

/* Define to 1 if you have the `bzero' function. */
#define HAVE_BZERO 1

/* Define to 1 if you have the `calloc' function. */
#define HAVE_CALLOC 1

/* Define to 1 if you have the `canonicalize_file_name' function. */
#define HAVE_CANONICALIZE_FILE_NAME 1

/* Define to 1 if you have the `clock' function. */
#define HAVE_CLOCK 1

/* Define to 1 if you have the declaration of `asprintf', and to 0 if you
   don't. */
#define HAVE_DECL_ASPRINTF 0

/* Define to 1 if you have the declaration of `basename(char *)', and to 0 if
   you don't. */
#define HAVE_DECL_BASENAME 0

/* Define to 1 if you have the declaration of `calloc', and to 0 if you don't.
   */
#define HAVE_DECL_CALLOC 1

/* Define to 1 if you have the declaration of `ffs', and to 0 if you don't. */
#define HAVE_DECL_FFS 1

/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
   */
#define HAVE_DECL_GETENV 1

/* Define to 1 if you have the declaration of `getopt', and to 0 if you don't.
   */
#define HAVE_DECL_GETOPT 1

/* Define to 1 if you have the declaration of `malloc', and to 0 if you don't.
   */
#define HAVE_DECL_MALLOC 1

/* Define to 1 if you have the declaration of `realloc', and to 0 if you
   don't. */
#define HAVE_DECL_REALLOC 1

/* Define to 1 if you have the declaration of `sbrk', and to 0 if you don't.
   */
#define HAVE_DECL_SBRK 1

/* Define to 1 if you have the declaration of `snprintf', and to 0 if you
   don't. */
#define HAVE_DECL_SNPRINTF 1

/* Define to 1 if you have the declaration of `strverscmp', and to 0 if you
   don't. */
#define HAVE_DECL_STRVERSCMP 0

/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you
   don't. */
#define HAVE_DECL_VASPRINTF 0

/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you
   don't. */
#define HAVE_DECL_VSNPRINTF 1

/* Define to 1 if you have the `dup3' function. */
/* #undef HAVE_DUP3 */

/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1

/* Define to 1 if you have the `ffs' function. */
#define HAVE_FFS 1

/* Define to 1 if you have the `fork' function. */
#define HAVE_FORK 1

/* Define to 1 if you have the `getcwd' function. */
#define HAVE_GETCWD 1

/* Define to 1 if you have the `getpagesize' function. */
#define HAVE_GETPAGESIZE 1

/* Define to 1 if you have the `getrlimit' function. */
#define HAVE_GETRLIMIT 1

/* Define to 1 if you have the `getrusage' function. */
#define HAVE_GETRUSAGE 1

/* Define to 1 if you have the `getsysinfo' function. */
/* #undef HAVE_GETSYSINFO */

/* Define to 1 if you have the `gettimeofday' function. */
#define HAVE_GETTIMEOFDAY 1

/* Define to 1 if you have the `index' function. */
#define HAVE_INDEX 1

/* Define to 1 if you have the `insque' function. */
#define HAVE_INSQUE 1

/* Define to 1 if the system has the type `intptr_t'. */
#define HAVE_INTPTR_T 1

/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1

/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1

/* Define to 1 if you have the <machine/hal_sysinfo.h> header file. */
/* #undef HAVE_MACHINE_HAL_SYSINFO_H */

/* Define to 1 if you have the <malloc.h> header file. */
#define HAVE_MALLOC_H 1

/* Define to 1 if you have the `memchr' function. */
#define HAVE_MEMCHR 1

/* Define to 1 if you have the `memcmp' function. */
#define HAVE_MEMCMP 1

/* Define to 1 if you have the `memcpy' function. */
#define HAVE_MEMCPY 1

/* Define to 1 if you have the `memmem' function. */
#define HAVE_MEMMEM 1

/* Define to 1 if you have the `memmove' function. */
#define HAVE_MEMMOVE 1

/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1

/* Define to 1 if you have the `memset' function. */
#define HAVE_MEMSET 1

/* Define to 1 if you have the `mkstemps' function. */
/* #undef HAVE_MKSTEMPS */

/* Define to 1 if you have a working `mmap' system call. */
/* #undef HAVE_MMAP */

/* Define to 1 if you have the `on_exit' function. */
#define HAVE_ON_EXIT 1

/* Define to 1 if you have the <process.h> header file. */
/* #undef HAVE_PROCESS_H */

/* Define to 1 if you have the `psignal' function. */
#define HAVE_PSIGNAL 1

/* Define to 1 if you have the `pstat_getdynamic' function. */
/* #undef HAVE_PSTAT_GETDYNAMIC */

/* Define to 1 if you have the `pstat_getstatic' function. */
/* #undef HAVE_PSTAT_GETSTATIC */

/* Define to 1 if you have the `putenv' function. */
#define HAVE_PUTENV 1

/* Define to 1 if you have the `random' function. */
#define HAVE_RANDOM 1

/* Define to 1 if you have the `realpath' function. */
#define HAVE_REALPATH 1

/* Define to 1 if you have the `rename' function. */
#define HAVE_RENAME 1

/* Define to 1 if you have the `rindex' function. */
#define HAVE_RINDEX 1

/* Define to 1 if you have the `sbrk' function. */
#define HAVE_SBRK 1

/* Define to 1 if you have the `setenv' function. */
#define HAVE_SETENV 1

/* Define to 1 if you have the `setproctitle' function. */
/* #undef HAVE_SETPROCTITLE */

/* Define to 1 if you have the `setrlimit' function. */
#define HAVE_SETRLIMIT 1

/* Define to 1 if you have the `sigsetmask' function. */
#define HAVE_SIGSETMASK 1

/* Define to 1 if you have the `snprintf' function. */
#define HAVE_SNPRINTF 1

/* Define to 1 if you have the `spawnve' function. */
/* #undef HAVE_SPAWNVE */

/* Define to 1 if you have the `spawnvpe' function. */
/* #undef HAVE_SPAWNVPE */

/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1

/* Define to 1 if you have the <stdio_ext.h> header file. */
#define HAVE_STDIO_EXT_H 1

/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1

/* Define to 1 if you have the `stpcpy' function. */
#define HAVE_STPCPY 1

/* Define to 1 if you have the `stpncpy' function. */
#define HAVE_STPNCPY 1

/* Define to 1 if you have the `strcasecmp' function. */
#define HAVE_STRCASECMP 1

/* Define to 1 if you have the `strchr' function. */
#define HAVE_STRCHR 1

/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1

/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1

/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1

/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1

/* Define to 1 if you have the `strncasecmp' function. */
#define HAVE_STRNCASECMP 1

/* Define to 1 if you have the `strndup' function. */
#define HAVE_STRNDUP 1

/* Define to 1 if you have the `strrchr' function. */
#define HAVE_STRRCHR 1

/* Define to 1 if you have the `strsignal' function. */
#define HAVE_STRSIGNAL 1

/* Define to 1 if you have the `strstr' function. */
#define HAVE_STRSTR 1

/* Define to 1 if you have the `strtod' function. */
#define HAVE_STRTOD 1

/* Define to 1 if you have the `strtol' function. */
#define HAVE_STRTOL 1

/* Define to 1 if you have the `strtoul' function. */
#define HAVE_STRTOUL 1

/* Define to 1 if you have the `strverscmp' function. */
#define HAVE_STRVERSCMP 1

/* Define to 1 if you have the `sysconf' function. */
#define HAVE_SYSCONF 1

/* Define to 1 if you have the `sysctl' function. */
#define HAVE_SYSCTL 1

/* Define to 1 if you have the `sysmp' function. */
/* #undef HAVE_SYSMP */

/* Define if you have the sys_errlist variable. */
#define HAVE_SYS_ERRLIST 1

/* Define to 1 if you have the <sys/file.h> header file. */
#define HAVE_SYS_FILE_H 1

/* Define to 1 if you have the <sys/mman.h> header file. */
#define HAVE_SYS_MMAN_H 1

/* Define if you have the sys_nerr variable. */
#define HAVE_SYS_NERR 1

/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1

/* Define to 1 if you have the <sys/prctl.h> header file. */
#define HAVE_SYS_PRCTL_H 1

/* Define to 1 if you have the <sys/pstat.h> header file. */
/* #undef HAVE_SYS_PSTAT_H */

/* Define to 1 if you have the <sys/resource.h> header file. */
#define HAVE_SYS_RESOURCE_H 1

/* Define if you have the sys_siglist variable. */
#define HAVE_SYS_SIGLIST 1

/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1

/* Define to 1 if you have the <sys/sysctl.h> header file. */
#define HAVE_SYS_SYSCTL_H 1

/* Define to 1 if you have the <sys/sysinfo.h> header file. */
#define HAVE_SYS_SYSINFO_H 1

/* Define to 1 if you have the <sys/sysmp.h> header file. */
/* #undef HAVE_SYS_SYSMP_H */

/* Define to 1 if you have the <sys/systemcfg.h> header file. */
/* #undef HAVE_SYS_SYSTEMCFG_H */

/* Define to 1 if you have the <sys/table.h> header file. */
/* #undef HAVE_SYS_TABLE_H */

/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1

/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1

/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
#define HAVE_SYS_WAIT_H 1

/* Define to 1 if you have the `table' function. */
/* #undef HAVE_TABLE */

/* Define to 1 if you have the `times' function. */
#define HAVE_TIMES 1

/* Define to 1 if you have the <time.h> header file. */
#define HAVE_TIME_H 1

/* Define to 1 if you have the `tmpnam' function. */
#define HAVE_TMPNAM 1

/* Define if you have the \`uintptr_t' type. */
#define HAVE_UINTPTR_T 1

/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1

/* Define to 1 if you have the `vasprintf' function. */
#define HAVE_VASPRINTF 1

/* Define to 1 if you have the `vfork' function. */
#define HAVE_VFORK 1

/* Define to 1 if you have the <vfork.h> header file. */
/* #undef HAVE_VFORK_H */

/* Define to 1 if you have the `vfprintf' function. */
#define HAVE_VFPRINTF 1

/* Define to 1 if you have the `vprintf' function. */
#define HAVE_VPRINTF 1

/* Define to 1 if you have the `vsprintf' function. */
#define HAVE_VSPRINTF 1

/* Define to 1 if you have the `wait3' function. */
#define HAVE_WAIT3 1

/* Define to 1 if you have the `wait4' function. */
#define HAVE_WAIT4 1

/* Define to 1 if you have the `waitpid' function. */
#define HAVE_WAITPID 1

/* Define to 1 if `fork' works. */
#define HAVE_WORKING_FORK 1

/* Define to 1 if `vfork' works. */
#define HAVE_WORKING_VFORK 1

/* Define to 1 if you have the `_doprnt' function. */
/* #undef HAVE__DOPRNT */

/* Define if you have the _system_configuration variable. */
/* #undef HAVE__SYSTEM_CONFIGURATION */

/* Define to 1 if you have the `__fsetlocking' function. */
#define HAVE___FSETLOCKING 1

/* Define if canonicalize_file_name is not declared in system header files. */
#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1

/* Define if errno must be declared even when <errno.h> is included. */
/* #undef NEED_DECLARATION_ERRNO */

/* Define to 1 if your C compiler doesn't accept -c and -o together. */
/* #undef NO_MINUS_C_MINUS_O */

/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""

/* Define to the full name of this package. */
#define PACKAGE_NAME ""

/* Define to the full name and version of this package. */
#define PACKAGE_STRING ""

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME ""

/* Define to the home page for this package. */
#define PACKAGE_URL ""

/* Define to the version of this package. */
#define PACKAGE_VERSION ""

/* The size of `int', as computed by sizeof. */
#define SIZEOF_INT 4

/* Define if you know the direction of stack growth for your system; otherwise
   it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows
   toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses
   STACK_DIRECTION = 0 => direction of growth unknown */
#define STACK_DIRECTION 0

/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1

/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1

/* Define to an unsigned 64-bit type available in the compiler. */
#define UNSIGNED_64BIT_TYPE uint64_t

/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
   significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
#  define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
/* #  undef WORDS_BIGENDIAN */
# endif
#endif

/* Number of bits in a file offset, on hosts where this is settable. */
#define _FILE_OFFSET_BITS 64

/* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */

/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */

/* Define to `__inline__' or `__inline' if that's what the C compiler
   calls it, or to nothing if 'inline' is not supported under any name.  */
#ifndef __cplusplus
/* #undef inline */
#endif

/* Define to the type of a signed integer type wide enough to hold a pointer,
   if such a type exists, and if the system does not define it. */
/* #undef intptr_t */

/* Define to `int' if <sys/types.h> does not define. */
/* #undef pid_t */

/* Define to `int' if <sys/types.h> does not define. */
/* #undef ssize_t */

/* Define to the type of an unsigned integer type wide enough to hold a
   pointer, if such a type exists, and if the system does not define it. */
/* #undef uintptr_t */

/* Define as `fork' if `vfork' does not work. */
/* #undef vfork */

[-- Attachment #4: Type: text/plain, Size: 152 bytes --]


-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcc-4.7.4: libgcc2.h:157: error: unable to emulate 'TF'
  2018-07-09 19:40   ` Jan Nieuwenhuizen
@ 2018-07-10  3:52     ` U.Mutlu
  2018-07-10  7:31       ` Gábor Boskovits
  2018-07-10 15:02       ` Jan Nieuwenhuizen
  0 siblings, 2 replies; 13+ messages in thread
From: U.Mutlu @ 2018-07-10  3:52 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: gcc-help, guix-devel

Jan Nieuwenhuizen wrote on 07/09/2018 09:40 PM:
> U.Mutlu writes:
>
>> What do you get if you grep for "error: " in the xxx/libgcc/config.log
>> under the builddir?
>
> janneke@guix-x86 /tmp/guix-build-gcc-mesboot-4.7.4.drv-0/gcc-4.7.4$ grep 'error: ' i386-unknown-linux/libgcc/config.log
> conftest.c:9:28: error: ac_nonexistent.h: No such file or directory
> conftest.c:13: error: size of array 'test_array' is negative
> conftest.c:13: error: size of array 'test_array' is negative
> conftest.c:13: error: size of array 'test_array' is negative
> conftest.c:13: error: size of array 'test_array' is negative
> conftest.c:14: error: size of array 'test_array' is negative
> conftest.c:14: error: size of array 'test_array' is negative
> conftest.c:14: error: size of array 'test_array' is negative
> conftest.c:14: error: size of array 'test_array' is negative
> conftest.c:14: error: size of array 'test_array' is negative
> conftest.c:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'x'
> conftest.c:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '_Fract'
>
>> It would also be helpful if you could post also your libiberty/config.h
>
> Sure, attached.
>
> janneke


You have attached config.h of 2 targets.
Is just one of them failing, or both?
And of course: are they both using the same target arch, just differing in 
64bit/32bit?

The difference in them is:
diff /tmp/build-i686-pc-linux-gnu--libiberty--config.h 
/tmp/host-i386-unknown-linux--libiberty--config.h |  less -Sn
171c171
< #define HAVE_MMAP 1
---
 > /* #undef HAVE_MMAP */
444c444
< #define STACK_DIRECTION -1
---
 > #define STACK_DIRECTION 0

If they both are the same arch then I would suggest to get the one fixed first 
where the STACK_DIRECTION is seemingly detected wrongly.


And don't use -Werror when compiling, ie. don't treat warnings as error.


And try to find out the reason for the above configure-error:

 > conftest.c:11: error: expected '=', ',', ';', 'asm' or '__attribute__' 
before 'x'
 > conftest.c:11: error: expected '=', ',', ';', 'asm' or '__attribute__' 
before '_Fract'


I forgot to ask: please post also the "error: "'s in libiberty/config.log, ie. 
the grep-output like above.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcc-4.7.4: libgcc2.h:157: error: unable to emulate 'TF'
  2018-07-10  3:52     ` U.Mutlu
@ 2018-07-10  7:31       ` Gábor Boskovits
  2018-07-10 15:07         ` Jan Nieuwenhuizen
  2018-07-10 15:02       ` Jan Nieuwenhuizen
  1 sibling, 1 reply; 13+ messages in thread
From: Gábor Boskovits @ 2018-07-10  7:31 UTC (permalink / raw)
  To: um; +Cc: gcc-help, Guix-devel

[-- Attachment #1: Type: text/plain, Size: 2730 bytes --]

U.Mutlu <um@mutluit.com> ezt írta (időpont: 2018. júl. 10., K, 5:53):

> Jan Nieuwenhuizen wrote on 07/09/2018 09:40 PM:
> > U.Mutlu writes:
> >
> >> What do you get if you grep for "error: " in the xxx/libgcc/config.log
> >> under the builddir?
> >
> > janneke@guix-x86 /tmp/guix-build-gcc-mesboot-4.7.4.drv-0/gcc-4.7.4$
> grep 'error: ' i386-unknown-linux/libgcc/config.log
> > conftest.c:9:28: error: ac_nonexistent.h: No such file or directory
> > conftest.c:13: error: size of array 'test_array' is negative
> > conftest.c:13: error: size of array 'test_array' is negative
> > conftest.c:13: error: size of array 'test_array' is negative
> > conftest.c:13: error: size of array 'test_array' is negative
> > conftest.c:14: error: size of array 'test_array' is negative
> > conftest.c:14: error: size of array 'test_array' is negative
> > conftest.c:14: error: size of array 'test_array' is negative
> > conftest.c:14: error: size of array 'test_array' is negative
> > conftest.c:14: error: size of array 'test_array' is negative
> > conftest.c:11: error: expected '=', ',', ';', 'asm' or '__attribute__'
> before 'x'
> > conftest.c:11: error: expected '=', ',', ';', 'asm' or '__attribute__'
> before '_Fract'
> >
> >> It would also be helpful if you could post also your libiberty/config.h
> >
> > Sure, attached.
> >
> > janneke
>
>
> You have attached config.h of 2 targets.
> Is just one of them failing, or both?
> And of course: are they both using the same target arch, just differing in
> 64bit/32bit?
>
> The difference in them is:
> diff /tmp/build-i686-pc-linux-gnu--libiberty--config.h
> /tmp/host-i386-unknown-linux--libiberty--config.h |  less -Sn
> 171c171
> < #define HAVE_MMAP 1
> ---
>  > /* #undef HAVE_MMAP */
> 444c444
> < #define STACK_DIRECTION -1
> ---
>  > #define STACK_DIRECTION 0
>
> If they both are the same arch then I would suggest to get the one fixed
> first
> where the STACK_DIRECTION is seemingly detected wrongly.
>
>
> And don't use -Werror when compiling, ie. don't treat warnings as error.
>
>
> And try to find out the reason for the above configure-error:
>
>  > conftest.c:11: error: expected '=', ',', ';', 'asm' or '__attribute__'
> before 'x'
>  > conftest.c:11: error: expected '=', ',', ';', 'asm' or '__attribute__'
> before '_Fract'
>
>
> I forgot to ask: please post also the "error: "'s in libiberty/config.log,
> ie.
> the grep-output like above.
>
>
>
>
It seems that the errors you were getting are related to 128 bit floating
point support. It also seems that 128 bit floating point support is enabled
on 64 bits. I'm not sure about the 32 bit case though, do you get the same
error there?

[-- Attachment #2: Type: text/html, Size: 3536 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcc-4.7.4: libgcc2.h:157: error: unable to emulate 'TF'
  2018-07-10  3:52     ` U.Mutlu
  2018-07-10  7:31       ` Gábor Boskovits
@ 2018-07-10 15:02       ` Jan Nieuwenhuizen
  1 sibling, 0 replies; 13+ messages in thread
From: Jan Nieuwenhuizen @ 2018-07-10 15:02 UTC (permalink / raw)
  To: U.Mutlu; +Cc: gcc-help, guix-devel

U.Mutlu writes:

> You have attached config.h of 2 targets.
> Is just one of them failing, or both?

I hoped to just get one, but I get two; I configure using

    ../build/configure --host=i386-unknown-linux --target=i386-unknown-linux ...

> And of course: are they both using the same target arch, just
> differing in 64bit/32bit?

Not even, this is inside a 32bit VM.  I was hoping to build an x86
toolchain on x86_64, but after these problems I setup a 32bit VM

Maybe I should use

    --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu

?

> The difference in them is:
> diff /tmp/build-i686-pc-linux-gnu--libiberty--config.h
> /tmp/host-i386-unknown-linux--libiberty--config.h |  less -Sn
> 171c171
> < #define HAVE_MMAP 1
> ---
>> /* #undef HAVE_MMAP */
> 444c444
> < #define STACK_DIRECTION -1
> ---
>> #define STACK_DIRECTION 0
>
> If they both are the same arch then I would suggest to get the one
> fixed first where the STACK_DIRECTION is seemingly detected wrongly.

Hmm, this is definitely wrong.

I'll have a look at this first...
janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcc-4.7.4: libgcc2.h:157: error: unable to emulate 'TF'
  2018-07-10  7:31       ` Gábor Boskovits
@ 2018-07-10 15:07         ` Jan Nieuwenhuizen
  2018-07-10 19:51           ` Jan Nieuwenhuizen
  0 siblings, 1 reply; 13+ messages in thread
From: Jan Nieuwenhuizen @ 2018-07-10 15:07 UTC (permalink / raw)
  To: Gábor Boskovits; +Cc: um, gcc-help, Guix-devel

Gábor Boskovits writes:

> It seems that the errors you were getting are related to 128 bit
> floating point support. It also seems that 128 bit floating point
> support is enabled on 64 bits. I'm not sure about the 32 bit case
> though, do you get the same error there?  

Ah!  That makes me even more supicious... I was wondering about this
command

    i386-unknown-linux-gcc ... -DIN_GCC -o _muldi3.o -c ../.././libgcc/libgcc2.c

this i386-unknown-linux-gcc compiler is the bootstrap compiler,
gcc-4.1.0 (or we may be able to use 2.95.3); is that OK?  Shouldn't the
new `xgcc' compiler be used to compile libgcc2?

janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcc-4.7.4: libgcc2.h:157: error: unable to emulate 'TF'
  2018-07-09 16:57 gcc-4.7.4: libgcc2.h:157: error: unable to emulate 'TF' Jan Nieuwenhuizen
  2018-07-09 18:28 ` U.Mutlu
@ 2018-07-10 15:54 ` Danny Milosavljevic
  1 sibling, 0 replies; 13+ messages in thread
From: Danny Milosavljevic @ 2018-07-10 15:54 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: gcc-help, guix-devel

[-- Attachment #1: Type: text/plain, Size: 1962 bytes --]

Hi Janneke,

On Mon, 09 Jul 2018 18:57:16 +0200
Jan Nieuwenhuizen <janneke@gnu.org> wrote:

>      i386-unknown-linux-gcc --sysroot=/gnu/store/jdjpfzjr2zf3xbf7ssl11ljwpq7spid8-glibc-mesboot-2.3.6/include   -g -O2 -O2  -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fpic -g -DIN_LIBGCC2 -fno-stack-protector   -fpic -I. -I. -I../../host-i386-unknown-linux/gcc -I../.././libgcc -I../.././libgcc/. -I../.././libgcc/../gcc -I../.././libgcc/../include  -DHAVE_CC_TLS  -DUSE_TLS -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c ../.././libgcc/libgcc2.c 
>      In file included from ../.././libgcc/libgcc2.c:58:
>      ../.././libgcc/libgcc2.h:157: error: unable to emulate 'TF'
>      ../.././libgcc/libgcc2.h:158: error: unable to emulate 'TC'
>      ../.././libgcc/libgcc2.h:161: error: unknown machine mode 'libgcc_cmp_return'
>      ../.././libgcc/libgcc2.h:162: error: unknown machine mode 'libgcc_shift_count'
>      ../.././libgcc/libgcc2.h:372: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__muldi3'
>      ../.././libgcc/libgcc2.h:373: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__divdi3'
>      ../.././libgcc/libgcc2.h:374: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__udivdi3'
>      ../.././libgcc/libgcc2.h:375: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__umoddi3'
>      ../.././libgcc/libgcc2.h:376: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__moddi3'
>      ...
> 
> Gcc-4.7.4 advertises it can be built with gcc-2.95 and binutils-2.13.1
> and glibc-2.2.5.

https://gcc.gnu.org/onlinedocs/gccint/Machine-Modes.html

TFmode is for 128 bit floats.

https://gcc.gnu.org/ml/gcc-patches/2008-06/msg01747.html
https://gcc.gnu.org/onlinedocs/gcc-4.8.5/gccint/Type-Layout.html

The softfp emulation is in libgcc.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcc-4.7.4: libgcc2.h:157: error: unable to emulate 'TF'
  2018-07-10 15:07         ` Jan Nieuwenhuizen
@ 2018-07-10 19:51           ` Jan Nieuwenhuizen
  2018-07-10 20:19             ` Jonathan Wakely
       [not found]             ` <5B452C86.6090003@mutluit.com>
  0 siblings, 2 replies; 13+ messages in thread
From: Jan Nieuwenhuizen @ 2018-07-10 19:51 UTC (permalink / raw)
  To: Gábor Boskovits; +Cc: um, gcc-help, Guix-devel

Jan Nieuwenhuizen writes:

> Gábor Boskovits writes:
>
>> It seems that the errors you were getting are related to 128 bit
>> floating point support. It also seems that 128 bit floating point
>> support is enabled on 64 bits. I'm not sure about the 32 bit case
>> though, do you get the same error there?  
>
> Ah!  That makes me even more supicious... I was wondering about this
> command
>
>     i386-unknown-linux-gcc ... -DIN_GCC -o _muldi3.o -c ../.././libgcc/libgcc2.c
>
> this i386-unknown-linux-gcc compiler is the bootstrap compiler,
> gcc-4.1.0 (or we may be able to use 2.95.3); is that OK?  Shouldn't the
> new `xgcc' compiler be used to compile libgcc2?

Some great progress!  I found the

    build-i686-pc-linux-gnu
    host-i386-unknown-linux

build directories very suspicous.  I found that in my bootstrap I used
the older `i386-unknown-linux' only because I started with a very early
binutils that didn't know about i686-*linux-gnu yet.

So I have changed the entire bootstrap to use i686-unknown-linux-gnu and
configure gcc-4.7.4 using

    ../build/configure
    --build=i686-unknown-linux-gnu
    --host=i686-unknown-linux-gnu
    --disable-decimal-float
    --disable-libatomic
    --disable-libcilkrts
    --disable-libgomp
    --disable-libitm
    --disable-libmudflap
    --disable-libquadmath
    --disable-libsanitizer
    --disable-libssp
    --disable-libstdcxx-pch
    --disable-libvtv
    --disable-lto
    --disable-lto-plugin
    --disable-multilib
    --disable-plugin
    --disable-shared
    --disable-threads
    --enable-languages=c
    --enable-static
    --prefix=/gnu/store/mkhbgqfpj17p2pfpza95y56dlw2fmfj4-gcc-mesboot-4.7.4
    --with-build-sysroot=/gnu/store/ffj8vq5zvm26jhw26fcmz3bjqdx5vfly-glibc-mesboot-2.2.5/include
    --with-native-system-header-dir=/gnu/store/ffj8vq5zvm26jhw26fcmz3bjqdx5vfly-glibc-mesboot-2.2.5/include

Now, building _muldi3.o from libgcc2.c passes, interestingly indeed the
fresh `xgcc' compiler is used now

    /tmp/guix-build-gcc-mesboot-4.7.4.drv-0/gcc-4.7.4/build/./gcc/xgcc -B/tmp/guix-build-gcc-mesboot-4.7.4.drv-0/gcc-4.7.4/build/./gcc/ -B/gnu/store/mkhbgqfpj17p2pfpza95y56dlw2fmfj4-gcc-mesboot-4.7.4/i686-unknown-linux-gnu/bin/ -B/gnu/store/mkhbgqfpj17p2pfpza95y56dlw2fmfj4-gcc-mesboot-4.7.4/i686-unknown-linux-gnu/lib/ -isystem /gnu/store/mkhbgqfpj17p2pfpza95y56dlw2fmfj4-gcc-mesboot-4.7.4/i686-unknown-linux-gnu/include -isystem /gnu/store/mkhbgqfpj17p2pfpza95y56dlw2fmfj4-gcc-mesboot-4.7.4/i686-unknown-linux-gnu/sys-include --sysroot=/gnu/store/ffj8vq5zvm26jhw26fcmz3bjqdx5vfly-glibc-mesboot-2.2.5/include   -g -O2 -O2  -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fpic -g -DIN_LIBGCC2 -fno-stack-protector   -fpic -I. -I. -I../.././gcc -I../../../libgcc -I../../../libgcc/. -I../../../libgcc/../gcc -I../../../libgcc/../include  -DHAVE_CC_TLS  -DUSE_TLS -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c ../../../libgcc/libgcc2.c 

no wonder it failed before.

However, now i get this error (I do not have pthreads/pthreads.h).

    /tmp/guix-build-gcc-mesboot-4.7.4.drv-0/gcc-4.7.4/build/./gcc/xgcc -B/tmp/guix-build-gcc-mesboot-4.7.4.drv-0/gcc-4.7.4/build/./gcc/ -B/gnu/store/mkhbgqfpj17p2pfpza95y56dlw2fmfj4-gcc-mesboot-4.7.4/i686-unknown-linux-gnu/bin/ -B/gnu/store/mkhbgqfpj17p2pfpza95y56dlw2fmfj4-gcc-mesboot-4.7.4/i686-unknown-linux-gnu/lib/ -isystem /gnu/store/mkhbgqfpj17p2pfpza95y56dlw2fmfj4-gcc-mesboot-4.7.4/i686-unknown-linux-gnu/include -isystem /gnu/store/mkhbgqfpj17p2pfpza95y56dlw2fmfj4-gcc-mesboot-4.7.4/i686-unknown-linux-gnu/sys-include --sysroot=/gnu/store/ffj8vq5zvm26jhw26fcmz3bjqdx5vfly-glibc-mesboot-2.2.5/include   -g -O2 -O2  -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fpic -g -DIN_LIBGCC2 -fno-stack-protector   -fpic -I. -I. -I../.././gcc -I../../../libgcc -I../../../libgcc/. -I../../../libgcc/../gcc -I../../../libgcc/../include  -DHAVE_CC_TLS  -DUSE_TLS -o generic-morestack-thread.o -MT generic-morestack-thread.o -MD -MP -MF generic-morestack-thread.dep  -c ../../../libgcc/generic-morestack-thread.c 
../../../libgcc/generic-morestack-thread.c:41:21: fatal error: pthread.h: No such file or directory
compilation terminated.
make[3]: *** [../../../libgcc/static-object.mk:17: generic-morestack-thread.o] Error 1

Thanks a lot for listening!

Greetings,
janneke
-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcc-4.7.4: libgcc2.h:157: error: unable to emulate 'TF'
  2018-07-10 19:51           ` Jan Nieuwenhuizen
@ 2018-07-10 20:19             ` Jonathan Wakely
       [not found]             ` <5B452C86.6090003@mutluit.com>
  1 sibling, 0 replies; 13+ messages in thread
From: Jonathan Wakely @ 2018-07-10 20:19 UTC (permalink / raw)
  To: janneke; +Cc: boskovits, um, gcc-help, guix-devel

On Tue, 10 Jul 2018 at 20:51, Jan Nieuwenhuizen wrote:
> However, now i get this error (I do not have pthreads/pthreads.h).

GNU/Linux targets are assumed to have Pthreads (because they should do).

Use --disable-threads or --enable-threads=single to override the default.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* SOLVED: Re: gcc-4.7.4: libgcc2.h:157: error: unable to emulate 'TF'
       [not found]             ` <5B452C86.6090003@mutluit.com>
@ 2018-07-11 17:01               ` Jan Nieuwenhuizen
  2018-07-11 18:06                 ` U.Mutlu
  0 siblings, 1 reply; 13+ messages in thread
From: Jan Nieuwenhuizen @ 2018-07-11 17:01 UTC (permalink / raw)
  To: U.Mutlu; +Cc: gcc-help, guix-devel

U.Mutlu writes:

> Just a tip: you can build the compiler much faster if you use --disable-bootstrap
> (here it reduces the compile time from 111 minutes down to 12 minutes).
> After it's ok, then you can build w/o it to also test the
> bootstrapping.

Thanks!  I'm very grateful for your help.  I succeeded in building
gcc-4.7.4 from almost no binary seeds[0] for GuixSD!

The weird error in Subject was caused by configure+make (and my usage of
configure flags, environment settings) trying to use CC_FOR_BUILD (the
i368-unknow-linux-gcc 2.95.3 compiler) to build libgcc2.c

Here's the configure that I used, which works.

../build/configure\
 --build=i686-unknown-linux-gnu\
 --host=i686-unknown-linux-gnu\
 --with-native-system-header-dir=/gnu/store/lwadx3lm73f8rmy8cvwijrflb9wgcm7j-glibc-mesboot-2.2.5/include\
 --with-build-sysroot=/gnu/store/lwadx3lm73f8rmy8cvwijrflb9wgcm7j-glibc-mesboot-2.2.5/include\
 --prefix=/gnu/store/bci6j4dfrmkfzqbpbbcz5ypk8xmr0j5z-gcc-mesboot-4.7.4\
 --disable-bootstrap\
 --disable-decimal-float\
 --disable-libatomic\
 --disable-libcilkrts\
 --disable-libgomp\
 --disable-libitm\
 --disable-libmudflap\
 --disable-libquadmath\
 --disable-libsanitizer\
 --disable-libssp\
 --disable-libvtv\
 --disable-lto\
 --disable-lto-plugin\
 --disable-multilib\
 --disable-plugin\
 --disable-shared\
 --disable-threads\
 --enable-languages=c\
 --enable-static\
 --enable-threads=single\
 --disable-libstdc__-v3\
 --disable-libstdcxx-pch\
 --disable-build-with-cxx

Greetings,
janneke

[0] http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/mes.scm?h=wip-bootstrap

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: SOLVED: Re: gcc-4.7.4: libgcc2.h:157: error: unable to emulate 'TF'
  2018-07-11 17:01               ` SOLVED: " Jan Nieuwenhuizen
@ 2018-07-11 18:06                 ` U.Mutlu
  2018-07-11 19:23                   ` Jan Nieuwenhuizen
  0 siblings, 1 reply; 13+ messages in thread
From: U.Mutlu @ 2018-07-11 18:06 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: gcc-help, guix-devel

Jan Nieuwenhuizen wrote on 07/11/2018 07:01 PM:
> U.Mutlu writes:
>
>> Just a tip: you can build the compiler much faster if you use --disable-bootstrap
>> (here it reduces the compile time from 111 minutes down to 12 minutes).
>> After it's ok, then you can build w/o it to also test the
>> bootstrapping.
>
> Thanks!  I'm very grateful for your help.  I succeeded in building
> gcc-4.7.4 from almost no binary seeds[0] for GuixSD!

Congrats!  :-)

Can you give us some info on your project? (mes?)
I think you mentioned TCC, scheme, own header files etc.
Did you still had to use also the old gcc 2.95.3 ?
What's the goal, and why especially that target version gcc 4.7.4 ?
As I could figure out, GuixSD is a (new) GNU package manager, right?
Just a little bit curious about your complicated looking project :-)


> The weird error in Subject was caused by configure+make (and my usage of
> configure flags, environment settings) trying to use CC_FOR_BUILD (the
> i368-unknow-linux-gcc 2.95.3 compiler) to build libgcc2.c
>
> Here's the configure that I used, which works.
>
> ../build/configure\
>   --build=i686-unknown-linux-gnu\
>   --host=i686-unknown-linux-gnu\
>   --with-native-system-header-dir=/gnu/store/lwadx3lm73f8rmy8cvwijrflb9wgcm7j-glibc-mesboot-2.2.5/include\
>   --with-build-sysroot=/gnu/store/lwadx3lm73f8rmy8cvwijrflb9wgcm7j-glibc-mesboot-2.2.5/include\
>   --prefix=/gnu/store/bci6j4dfrmkfzqbpbbcz5ypk8xmr0j5z-gcc-mesboot-4.7.4\
>   --disable-bootstrap\
>   --disable-decimal-float\
>   --disable-libatomic\
>   --disable-libcilkrts\
>   --disable-libgomp\
>   --disable-libitm\
>   --disable-libmudflap\
>   --disable-libquadmath\
>   --disable-libsanitizer\
>   --disable-libssp\
>   --disable-libvtv\
>   --disable-lto\
>   --disable-lto-plugin\
>   --disable-multilib\
>   --disable-plugin\
>   --disable-shared\
>   --disable-threads\
>   --enable-languages=c\
>   --enable-static\
>   --enable-threads=single\
>   --disable-libstdc__-v3\
>   --disable-libstdcxx-pch\
>   --disable-build-with-cxx
>
> Greetings,
> janneke
>
> [0] http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/mes.scm?h=wip-bootstrap
>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: SOLVED: Re: gcc-4.7.4: libgcc2.h:157: error: unable to emulate 'TF'
  2018-07-11 18:06                 ` U.Mutlu
@ 2018-07-11 19:23                   ` Jan Nieuwenhuizen
  0 siblings, 0 replies; 13+ messages in thread
From: Jan Nieuwenhuizen @ 2018-07-11 19:23 UTC (permalink / raw)
  To: U.Mutlu; +Cc: gcc-help, guix-devel

U.Mutlu writes:

>> Thanks!  I'm very grateful for your help.  I succeeded in building
>> gcc-4.7.4 from almost no binary seeds[0] for GuixSD!
>
> Congrats!  :-)

Thanks!

> Can you give us some info on your project? (mes?)

Mes[0] aims to help create full source bootstrapping for GNU/Linux
distributions such as GuixSD[1] as part of the bootstrappable builds[2]
effort.

It consists of a mutual self-hosting Scheme interpreter written in
~5,000LOC of simple C and a Nyacc-based C compiler written in Scheme.

> As I could figure out, GuixSD is a (new) GNU package manager, right?

Correct.  Guix is the packagage manager, GuixSD (for System Distribution) is
GNU's GNU/Linux distribution built around it.

> I think you mentioned TCC, scheme, own header files etc.

This MesCC compiler comes with three sizes of Mes lib C: libc for
building mes.c, libc+tcc for building TCC.  Then, there is libc+gnu that
is used together with TCC to build binutils-2.20a and gcc-2.95.3.

> Did you still had to use also the old gcc 2.95.3 ?

We are using gcc 2.95.3 as the first GCC compiler mainly because (after
many experiments with versions from 1.40 to 4.1) it proved the most
"bootstrappable" GCC.  GCC 3 introduces a dependency on dirent, e.g.,
that our naive C library does not support.

If we make our libc+gnu richer then we can probably target a newer GCC,
but it's not obvious to me what the bootstrap consequences of that are.

> What's the goal, and why especially that target version gcc 4.7.4 ?

GCC 4.7.4 is currently used as one of the bootstrap binaries of GuixSD.
Also, it's the most recent GCC compiler that can be considered to be
directly bootstrappable.  I don't consider building a c++ bootstrap
compiler ;-)

The goal is to replace the x86 bootstrap of GNU/Linux distributions,
using a bootstrap [mostly] from source instead of what currently
happens: seeding it with a very large blob of bootstrap binaries.

GuixSD seems the best place to develop this in.

> Just a little bit curious about your complicated looking project :-)

Thanks for showing interest!

Greetings,
janneke


[0] http://gitlab.com/janneke/mes
[1] https://www.gnu.org/software/guix
[2] http://bootstrappable.org

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-07-11 19:23 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-09 16:57 gcc-4.7.4: libgcc2.h:157: error: unable to emulate 'TF' Jan Nieuwenhuizen
2018-07-09 18:28 ` U.Mutlu
2018-07-09 19:40   ` Jan Nieuwenhuizen
2018-07-10  3:52     ` U.Mutlu
2018-07-10  7:31       ` Gábor Boskovits
2018-07-10 15:07         ` Jan Nieuwenhuizen
2018-07-10 19:51           ` Jan Nieuwenhuizen
2018-07-10 20:19             ` Jonathan Wakely
     [not found]             ` <5B452C86.6090003@mutluit.com>
2018-07-11 17:01               ` SOLVED: " Jan Nieuwenhuizen
2018-07-11 18:06                 ` U.Mutlu
2018-07-11 19:23                   ` Jan Nieuwenhuizen
2018-07-10 15:02       ` Jan Nieuwenhuizen
2018-07-10 15:54 ` Danny Milosavljevic

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).