WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: TC7.2rc1 compiletc woes...  (Read 6666 times)

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
TC7.2rc1 compiletc woes...
« on: October 08, 2016, 01:09:06 AM »
This may be due to old hardware regression but i am unable to compile anything in TC7, it always worked great in TC6 and build-essential works fine in dCore-jessie same hardware. Can't compile a simple hello.c program and other compile attempts fail with ./configure and make. Tried different software, TTY vs graphics, different flags (but don't really know what i'm doing here). Always get same Illegal Instruction error:
Code: [Select]
tc@box:/tmp$ gcc hello.c
cc1: internal compiler error: Illegal instruction
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Output from cat /proc/cpuinfo:
Code: [Select]
tc@box:/tmp$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 8
model name      : Celeron (Coppermine)
stepping        : 10
microcode       : 0x1
cpu MHz         : 801.898
cache size      : 128 KB
physical id     : 0
siblings        : 1
core id         : 0
cpu cores       : 1
apicid          : 0
initial apicid  : 0
fdiv_bug        : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pse36 mmx fxsr sse
bugs            :
bogomips        : 1604.62
clflush size    : 32
cache_alignment : 32
address sizes   : 36 bits physical, 32 bits virtual
power management:

Flags tried for example, -march=native and -mtune=native. What else can i try and how to troubleshoot? Can anyone provide a foolproof 'gcc ... hello.c' syntax example that should compile on above hardware for testing? Noticed binutils v2.27 is available if there was a recent bug fix. The binutils info file indicates gold linker recently enabled not sure if that has anything to do with the problem. As always thanks for any help provided.

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: TC7.2rc1 compiletc woes...
« Reply #1 on: October 08, 2016, 01:41:30 AM »
With reference to this:

https://gcc.gnu.org/onlinedocs/gcc-5.2.0/gcc/x86-Options.html#x86-Options

..do you know which of the cpu-types your cpu corresponds to?

Note that you can run the configure script from the gmp source code to get a good indication of the cpu type.

Does "cc -E hello.c" give any more clues as to the problem?

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: TC7.2rc1 compiletc woes...
« Reply #2 on: October 08, 2016, 04:58:06 AM »
Hi Juanito. From what i can tell Celeron Coppermine is a PIII = P6 = i686 processor?
https://en.wikipedia.org/wiki/Pentium_III
https://en.wikipedia.org/wiki/P6_(microarchitecture)

Whatever i try doesn't work, but i'm over my head. Running following results in same error, also tried various combinations of generic, i686, native, etc:
Code: [Select]
tc@box:/tmp$ gcc -march=native -mtune=generic -mfpmath=sse hello.c
cc1: internal compiler error: Illegal instruction
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Extracted GMP source from here and get:
https://gmplib.org/#DOWNLOAD

Code: [Select]
tc@box:/tmp/gmp-6.1.1$ ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking ABI=32
checking compiler gcc -m32 -O2 -pedantic -fomit-frame-pointer ... no
checking compiler gcc -O2 -pedantic -fomit-frame-pointer ... no
checking compiler icc -no-gcc ... no
checking compiler cc -O ... no
configure: error: could not find a working compiler, see config.log for details

Maybe config.log will help troubleshoot:
Code: [Select]
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by GNU MP configure 6.1.1, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ ./configure

## --------- ##
## Platform. ##
## --------- ##

hostname = box
uname -m = i686
uname -r = 4.2.9-tinycore
uname -s = Linux
uname -v = #1999 SMP Mon Jan 18 19:42:12 UTC 2016

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /home/tc/.local/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /apps/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /etc/sysconfig/tcedir/ondemand


## ----------- ##
## Core tests. ##
## ----------- ##

configure:3055: checking build system type
configure:3069: result: i686-pc-linux-gnu
configure:3089: checking host system type
configure:3102: result: i686-pc-linux-gnu
configure:3139: checking for a BSD-compatible install
configure:3207: result: /usr/bin/install -c
configure:3218: checking whether build environment is sane
configure:3273: result: yes
configure:3424: checking for a thread-safe mkdir -p
configure:3463: result: ./install-sh -c -d
configure:3470: checking for gawk
configure:3486: found /usr/local/bin/gawk
configure:3497: result: gawk
configure:3508: checking whether make sets $(MAKE)
configure:3530: result: yes
configure:3559: checking whether make supports nested variables
configure:3576: result: yes
configure:3705: checking whether to enable maintainer-specific portions of Makefiles
configure:3714: result: no
User:
ABI=
CC=
CFLAGS=(unset)
CPPFLAGS=(unset)
MPN_PATH=
GMP:
abilist=32
cclist=gcc icc cc
configure:5735: gcc 2>&1 | grep xlc >/dev/null
configure:5738: $? = 1
configure:5792: checking compiler gcc -m32 -O2 -pedantic -fomit-frame-pointer
Test compile:
configure:5806: gcc -m32 -O2 -pedantic -fomit-frame-pointer  conftest.c >&5
cc1: internal compiler error: Illegal instruction
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
configure:5809: $? = 1
failed program was:

int main () { return 0; }
configure:6895: result: no
configure:5792: checking compiler gcc -O2 -pedantic -fomit-frame-pointer
Test compile:
configure:5806: gcc -O2 -pedantic -fomit-frame-pointer  conftest.c >&5
cc1: internal compiler error: Illegal instruction
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
configure:5809: $? = 1
failed program was:

int main () { return 0; }
configure:6895: result: no
configure:5713: icc -c conftest.c >&5
./configure: eval: line 1: icc: not found
configure:5716: $? = 127
configure:5735: icc 2>&1 | grep xlc >/dev/null
configure:5738: $? = 1
configure:5792: checking compiler icc -no-gcc
Test compile:
configure:5806: icc -no-gcc  conftest.c >&5
./configure: eval: line 1: icc: not found
configure:5809: $? = 127
failed program was:

int main () { return 0; }
configure:6895: result: no
configure:5713: cc -c conftest.c >&5
cc1: internal compiler error: Illegal instruction
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
configure:5716: $? = 1
configure:5735: cc 2>&1 | grep xlc >/dev/null
configure:5738: $? = 1
configure:5792: checking compiler cc -O
Test compile:
configure:5806: cc -O  conftest.c >&5
cc1: internal compiler error: Illegal instruction
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
configure:5809: $? = 1
failed program was:

int main () { return 0; }
configure:6895: result: no
configure:7133: error: could not find a working compiler, see config.log for details

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build='i686-pc-linux-gnu'
ac_cv_env_ABI_set=''
ac_cv_env_ABI_value=''
ac_cv_env_CCC_set=''
ac_cv_env_CCC_value=''
ac_cv_env_CC_FOR_BUILD_set=''
ac_cv_env_CC_FOR_BUILD_value=''
ac_cv_env_CC_set=''
ac_cv_env_CC_value=''
ac_cv_env_CFLAGS_set=''
ac_cv_env_CFLAGS_value=''
ac_cv_env_CPPFLAGS_set=''
ac_cv_env_CPPFLAGS_value=''
ac_cv_env_CPP_FOR_BUILD_set=''
ac_cv_env_CPP_FOR_BUILD_value=''
ac_cv_env_CPP_set=''
ac_cv_env_CPP_value=''
ac_cv_env_CXXCPP_set=''
ac_cv_env_CXXCPP_value=''
ac_cv_env_CXXFLAGS_set=''
ac_cv_env_CXXFLAGS_value=''
ac_cv_env_CXX_set=''
ac_cv_env_CXX_value=''
ac_cv_env_LDFLAGS_set=''
ac_cv_env_LDFLAGS_value=''
ac_cv_env_LIBS_set=''
ac_cv_env_LIBS_value=''
ac_cv_env_LT_SYS_LIBRARY_PATH_set=''
ac_cv_env_LT_SYS_LIBRARY_PATH_value=''
ac_cv_env_M4_set=''
ac_cv_env_M4_value=''
ac_cv_env_YACC_set=''
ac_cv_env_YACC_value=''
ac_cv_env_YFLAGS_set=''
ac_cv_env_YFLAGS_value=''
ac_cv_env_build_alias_set=''
ac_cv_env_build_alias_value=''
ac_cv_env_host_alias_set=''
ac_cv_env_host_alias_value=''
ac_cv_env_target_alias_set=''
ac_cv_env_target_alias_value=''
ac_cv_host='i686-pc-linux-gnu'
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AWK='gawk'
ac_cv_prog_make_make_set='yes'
am_cv_make_support_nested_variables='yes'

## ----------------- ##
## Output variables. ##
## ----------------- ##

ABI=''
ACLOCAL='${SHELL} /tmp/gmp-6.1.1/missing aclocal-1.15'
AMTAR='$${TAR-tar}'
AM_BACKSLASH='\'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
AM_DEFAULT_VERBOSITY='1'
AM_V='$(V)'
AR=''
AS=''
ASMFLAGS=''
AUTOCONF='${SHELL} /tmp/gmp-6.1.1/missing autoconf'
AUTOHEADER='${SHELL} /tmp/gmp-6.1.1/missing autoheader'
AUTOMAKE='${SHELL} /tmp/gmp-6.1.1/missing automake-1.15'
AWK='gawk'
CALLING_CONVENTIONS_OBJS='x86call.lo x86check$U.lo'
CC=''
CCAS=''
CC_FOR_BUILD=''
CFLAGS=''
CPP=''
CPPFLAGS=''
CPP_FOR_BUILD=''
CXX=''
CXXCPP=''
CXXFLAGS=''
CYGPATH_W='echo'
DEFN_LONG_LONG_LIMB=''
DEFS=''
DLLTOOL=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
ENABLE_STATIC_FALSE=''
ENABLE_STATIC_TRUE=''
EXEEXT=''
EXEEXT_FOR_BUILD=''
FGREP=''
GMP_LDFLAGS=''
GMP_LIMB_BITS=''
GMP_NAIL_BITS='0'
GREP=''
HAVE_CLOCK_01=''
HAVE_CPUTIME_01=''
HAVE_GETRUSAGE_01=''
HAVE_GETTIMEOFDAY_01=''
HAVE_HOST_CPU_FAMILY_power='0'
HAVE_HOST_CPU_FAMILY_powerpc='0'
HAVE_SIGACTION_01=''
HAVE_SIGALTSTACK_01=''
HAVE_SIGSTACK_01=''
HAVE_STACK_T_01=''
HAVE_SYS_RESOURCE_H_01=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LD=''
LDFLAGS=''
LEX=''
LEXLIB=''
LEX_OUTPUT_ROOT=''
LIBCURSES=''
LIBGMPXX_LDFLAGS=''
LIBGMP_DLL=''
LIBGMP_LDFLAGS=''
LIBM=''
LIBM_FOR_BUILD=''
LIBOBJS=''
LIBREADLINE=''
LIBS=''
LIBTOOL=''
LIPO=''
LN_S=''
LTLIBOBJS=''
LT_SYS_LIBRARY_PATH=''
M4=''
MAINT='#'
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE='#'
MAKEINFO='${SHELL} /tmp/gmp-6.1.1/missing makeinfo'
MANIFEST_TOOL=''
MKDIR_P='./install-sh -c -d'
NM=''
NMEDIT=''
OBJDUMP=''
OBJEXT=''
OTOOL64=''
OTOOL=''
PACKAGE='gmp'
PACKAGE_BUGREPORT='gmp-bugs@gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html'
PACKAGE_NAME='GNU MP'
PACKAGE_STRING='GNU MP 6.1.1'
PACKAGE_TARNAME='gmp'
PACKAGE_URL='http://www.gnu.org/software/gmp/'
PACKAGE_VERSION='6.1.1'
PATH_SEPARATOR=':'
RANLIB=''
SED=''
SET_MAKE=''
SHELL='/bin/sh'
SPEED_CYCLECOUNTER_OBJ='pentium.lo'
STRIP=''
TAL_OBJECT=''
TUNE_LIBS=''
TUNE_SQR_OBJ=''
U_FOR_BUILD=''
VERSION='6.1.1'
WANT_CXX_FALSE=''
WANT_CXX_TRUE=''
WITH_READLINE_01=''
YACC=''
YFLAGS=''
ac_ct_AR=''
ac_ct_CC=''
ac_ct_CXX=''
ac_ct_DUMPBIN=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__isrc=''
am__leading_dot='.'
am__tar='$${TAR-tar} chof - "$$tardir"'
am__untar='$${TAR-tar} xf -'
bindir='${exec_prefix}/bin'
build='i686-pc-linux-gnu'
build_alias=''
build_cpu='i686'
build_os='linux-gnu'
build_vendor='pc'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
gmp_srclinks=''
host='i686-pc-linux-gnu'
host_alias=''
host_cpu='i686'
host_os='linux-gnu'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /tmp/gmp-6.1.1/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='$(MKDIR_P)'
mpn_objects=''
mpn_objs_in_libgmp=''
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "GNU MP"
#define PACKAGE_TARNAME "gmp"
#define PACKAGE_VERSION "6.1.1"
#define PACKAGE_STRING "GNU MP 6.1.1"
#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html"
#define PACKAGE_URL "http://www.gnu.org/software/gmp/"
#define PACKAGE "gmp"
#define VERSION "6.1.1"
#define WANT_FFT 1
#define HAVE_HOST_CPU_i686 1

configure: exit 1

Lastly, this doesn't appear helpful:
Code: [Select]
tc@box:/tmp$ cc -E hello.c
cc1: internal compiler error: Illegal instruction
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: TC7.2rc1 compiletc woes...
« Reply #3 on: October 08, 2016, 05:05:21 AM »
Just to add if this might help:
Code: [Select]
tc@box:/tmp$ gcc -Q -v hello.c
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/tmp/tcloop/gcc/usr/local/bin/../lib/gcc/i486-pc-linux-gnu/5.2.0/lto-wrapper
Target: i486-pc-linux-gnu
Configured with: ../gcc-5.2.0/configure --prefix=/usr/local --enable-languages=c,c++ --disable-multilib --disable-bootstrap --with-system-zlib --libexecdir=/usr/local/lib --enable-frame-pointer --enable-gold
Thread model: posix
gcc version 5.2.0 (GCC)
COLLECT_GCC_OPTIONS='-Q' '-v' '-mtune=i486' '-march=i486'
 /tmp/tcloop/gcc/usr/local/bin/../lib/gcc/i486-pc-linux-gnu/5.2.0/cc1 -v -iprefix /tmp/tcloop/gcc/usr/local/bin/../lib/gcc/i486-pc-linux-gnu/5.2.0/ hello.c -dumpbase hello.c -mtune=i486 -march=i486 -auxbase hello -version -o /tmp/ccyZnIAa.s
cc1: internal compiler error: Illegal instruction
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Is there a way to compile with clean blank slate, no pre-configures? All i want is a simple compile, can worry about optimizations later.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: TC7.2rc1 compiletc woes...
« Reply #4 on: October 08, 2016, 05:13:43 AM »
The gcc package clearly uses something your cpu does not support. Could be sse2, could be something else. You might be able to tell what instruction by running it in gdb (gdb --args gcc hello.c), but the only immediate workaround would be to compile on tc6, or on newer hardware.
The only barriers that can stop you are the ones you create yourself.

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: TC7.2rc1 compiletc woes...
« Reply #5 on: October 08, 2016, 09:19:58 AM »
If gmp thinks you have an i686 (or equivalent), then that's probably what you have.

The fact that "cc -E" comes up with an illegal instruction error would seem to indicate that there's some aspect of your cpu instruction set that gcc doesn't like though  :(

(note that the tc-6.x and tc-7.x gcc extensions were built in the same way - although they are obviously not the same versions)

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: TC7.2rc1 compiletc woes...
« Reply #6 on: October 08, 2016, 02:21:17 PM »
Yes indeed sad that an i668 equivalent system can no longer compile in TC7. Did some checking, build-essential works fine on the same hardware with dCore-jessie and dCore-xenial, which receive support until 2020 and 2021 respectively. Although it appears i'm the only one using this type of old hardware in Tiny Core, unlikely. To me, much of Tiny Core's appeal is the ability to compile and submit extensions, and staying with the current RC is nice too. On problematic hardware, loaded tcc.tcz and it compiled the test hello.c program without drama. So some sort of regression in gcc or a dependency.

Installed latest TC7 RC in SSE2 system, no problem compiling there either. So i guess i can simply compile from that computer but that isn't my preference. Tried to look for a gcc build-dep file in the TC 7.x, 6.x and 5.x source directories, just found this:
http://distro.ibiblio.org/tinycorelinux/5.x/x86/tcz/src/gcc/
compile_clfs_x86_32_tc5

Does this mean gcc is cross-compiled from Linux from Scratch? If incorrect, please point me to the correct build-dep file. I was going to try compiling the TC6 gcc version in TC7 but it's looking quite complicated to me.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: TC7.2rc1 compiletc woes...
« Reply #7 on: October 08, 2016, 03:29:51 PM »
It's not about the GCC version, but the system the GCC was built on. It somehow takes the build system's cpu into account, even when told not to. So if you built tc7's gcc version on tc6, on the old computer, it would run there.
The only barriers that can stop you are the ones you create yourself.

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: TC7.2rc1 compiletc woes...
« Reply #8 on: October 08, 2016, 10:02:22 PM »
It's not about the GCC version, but the system the GCC was built on. It somehow takes the build system's cpu into account, even when told not to.
Sounds like a bug in gcc.

Quote
So if you built tc7's gcc version on tc6, on the old computer, it would run there.
So gcc should optimally be built on the oldest active TC computer being used! Juanito, you're welcome at my place, probably only take a couple days for the old system to build gcc :-)  Came across this interesting link (https://gcc.gnu.org/wiki/CompileFarm), wonder if something like this could be trialed for the next gcc update so it works across more hardware, i would be more than happy to test. Still not sure i was reviewing the proper gcc build notes linked above, if so the most complicated compile ever. I've reached the end of my ability and have suitable workarounds, still a bummer, can't help but think TC is leaving some good old hardware behind.

Thanks for all your inputs.

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: TC7.2rc1 compiletc woes...
« Reply #9 on: October 09, 2016, 01:15:57 AM »
So gcc should optimally be built on the oldest active TC computer being used!

The x86 tinycore toolchain is built using a "uname_hack" kernel module compiled to make the cpu look like an i484 - whilst this might not be infallible (the gmp source still needs hacking), it was an improvement over previous methods.

I'll be away for a couple of days, but then I'll have another look at the tc-7.x gcc.

Meanwhile, you can see how the toolchain was built here:

http://repo.tinycorelinux.net/7.x/x86/release/src/toolchain/compile_tc7_x86

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: TC7.2rc1 compiletc woes...
« Reply #10 on: October 09, 2016, 03:13:49 AM »
Ref:
Quote
‘i686’
When used with -march, the Pentium Pro instruction set is used, so the code runs on all i686 family chips. When used with -mtune, it has the same meaning as ‘generic’.
‘pentium2’
Intel Pentium II CPU, based on Pentium Pro core with MMX instruction set support.
‘pentium3’
‘pentium3m’
Intel Pentium III CPU, based on Pentium Pro core with MMX and SSE instruction set support.
‘pentium-m’
Intel Pentium M; low-power version of Intel Pentium III CPU with MMX, SSE and SSE2 instruction set support. Used by Centrino notebooks.

..I'd say our problem is that gcc-5.2.0 is trying, incorrectly, to use an SSE2 instruction. Your cpu can only use SSE, but in any case, as gcc was compiled for i484, it shouldn't even try SSE instructions.

If so, this is a bug with gcc-5.2.0 rather than a problem with the way it has been compiled.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: TC7.2rc1 compiletc woes...
« Reply #11 on: October 09, 2016, 04:01:08 AM »
Yeah, it happens occasionally, we've hit it before. Not a lot of people try to run modern gcc on old cpus.
The only barriers that can stop you are the ones you create yourself.

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: TC7.2rc1 compiletc woes...
« Reply #12 on: October 09, 2016, 03:53:01 PM »
Juanito sent updated gcc.tcz:
Code: [Select]
tc@box:/tmp$ version
7.2rc1
tc@box:/tmp$ cat /proc/cpuinfo | grep sse
flags           : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pse36 mmx fxsr sse
tc@box:/tmp$ gcc hello.c
tc@box:/tmp$ ./a.out
Hello, world!

Congratulations, you're a wizard!

What changed?

Posting notes, GCC versions on non-SSE2 system:
* dCore-jessie works: gcc (Debian 4.9.2-10) 4.9.2
* dCore-xenial works: gcc (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609
* TC 6 works: gcc 4.9.1
* TC 7 was broken/Juanito's fix works: gcc (GCC) 5.2.0

Also came across these GCC 6 changes:
Quote
Support for a number of older systems and recently unmaintained or untested target ports of GCC has been declared obsolete in GCC 6. Unless there is activity to revive them, the next release of GCC will have their sources permanently removed.
https://gcc.gnu.org/gcc-6/changes.html

Maybe future TC releases could stick with v5.x for a while longer (til 2021 to match dCore-xenial)   :)

Surely TC users with old systems will thank-you, thanks for the Thanksgiving weekend gift (Canadian eh).

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: TC7.2rc1 compiletc woes...
« Reply #13 on: October 10, 2016, 03:47:15 AM »
That quote has been in every GCC release notes since 15 years or so. This time it was the SH5.
The only barriers that can stop you are the ones you create yourself.

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: TC7.2rc1 compiletc woes...
« Reply #14 on: October 11, 2016, 10:45:59 AM »
What changed?

if gcc-5.2.0 is used to compile itself with -flto then it seems an SSE2 instruction gets built in somewhere. If it is compiled without -flto then things seem fine.

..except the extension is 4mb larger