Tiny Core Base > CorePlus

My last (I promise) tantrum: is it possible to run gcc on a Pentium 166?

<< < (2/7) > >>

t18:

--- Quote from: Juanito on May 26, 2025, 08:56:57 AM ---Did you use “-march=i486 -mtune=i686”? If not you will have compiled code that works on your i5, but not necessarily on your pentium.

--- End quote ---

Yes, i did.


--- Quote from: Rich on May 26, 2025, 09:00:06 AM ---If you did, was it ignored?
Some projects have make files that ignore compiler directives
that the user specifies in the environment.

--- End quote ---

I don't know, I didn't be aware of it.

This is the "file" output:


--- Code: ---bash-5.1$ file xterm
xterm: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, with debug_info, not stripped
bash-5.1$

--- End code ---

And this is its Makefile:


--- Code: ---# -----------------------------------------------------------------------------

SHELL = /bin/sh

#### Start of system configuration section. ####

srcdir = .


x =
o = .o

CC = gcc -march=i486 -mtune=i686 -Os -pipe -fomit-frame-pointer
CPP = gcc -march=i486 -mtune=i686 -Os -pipe -fomit-frame-pointer -E
AWK = gawk
LINK = $(CC) $(CFLAGS)

CTAGS = ctags
ETAGS = etags

LN_S = ln -s
RM              = rm -f
LINT =

INSTALL = /usr/bin/ginstall -c
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
transform = s,x,x,

EXTRA_CFLAGS =
EXTRA_CPPFLAGS =  -DPROJECTROOT='"/usr"' -D__vendorversion__='"Version 7.7.0 X.Org"'
EXTRA_LOADFLAGS =

CPPFLAGS = -I. -I$(srcdir) -DHAVE_CONFIG_H  -D_GNU_SOURCE  -I. -I/usr/include/freetype2 -I/usr/include/freetype2/config -Dlinux -D__amd64__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DFUNCPROTO=15 -DNARROWPROTO     -DXFREE86_FT2 -DUTMP  -DOSMAJORVERSION=5 -DOSMINORVERSION=15 -I/usr/include  -I/usr/include/libxml2 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  -I/usr/include/libxml2 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 $(EXTRA_CPPFLAGS)
CFLAGS = -g -O2 $(EXTRA_CFLAGS)
LDFLAGS = 
LIBS =  -lfontconfig -lfreetype -lXft -lXmu -lXt -lX11 -lXaw7 -lXt -lX11 -lXpm -lSM -lICE -lXt -lX11 -ltermcap

prefix = /opt/_prog32/_instal32/x-term
exec_prefix = ${prefix}
datarootdir = ${prefix}/share
datadir = ${datarootdir}

manext = 1
bindir = ${exec_prefix}/bin
libdir = ${exec_prefix}/lib
mandir = ${datarootdir}/man/man$(manext)
appsdir = ${exec_prefix}/lib/X11/app-defaults
icondir = no
pixmapdir = ${datadir}/pixmaps

#### End of system configuration section. ####
--- End code ---

Rich:
Hi t18
I would add:

--- Code: ----march=i486 -mtune=i686 -Os -pipe -fomit-frame-pointer
--- End code ---
to  EXTRA_CFLAGS  and  EXTRA_CPPFLAGS

Juanito:
..and if that doesn't work, you can try (in addition to the flags):
--- Code: --- LD_PRELOAD=uname_hack.so ./configure --blah-blah
LD_PRELOAD=uname_hack.so make
LD_PRELOAD=uname_hack.so sudo make install

--- End code ---

Using http://tinycorelinux.net/16.x/x86/release/src/toolchain/uname_hack.so

t18:

--- Quote from: Rich on May 26, 2025, 09:18:09 AM ---Hi t18
I would add:

--- Code: ----march=i486 -mtune=i686 -Os -pipe -fomit-frame-pointer
--- End code ---
to  EXTRA_CFLAGS  and  EXTRA_CPPFLAGS

--- End quote ---

They seems to get ignored: no change in the Makefile.

I did make distclean.

patrikg:
There lots of include in there, maybe there some libs that doesn't was compiled with all flags to support old asm instructions code.
And do you compile static the linker maybe takes some libs.a (pre build static lib) into your compiled code.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version