Les membres ayant 30 points peuvent parler sur les canaux annonces, projets et hs du chat.
La shoutbox n'est pas chargée par défaut pour des raisons de performances. Cliquez pour charger.

Forum Casio - Vos tutoriels et astuces


Index du Forum » Vos tutoriels et astuces » [Tutoriel] Installation manuelle de GCC (et du fxSDK)
Lephenixnoir En ligne Administrateur Points: 24225 Défis: 170 Message

[Tutoriel] Installation manuelle de GCC (et du fxSDK)

Posté le 31/05/2014 17:02

Parmi les compilateurs C/C++ modernes de premier plan (LLVM, GCC, MSVC...), GCC est le seul à avoir un backend SuperH, ie. capable de générer des add-ins pour les calculatrices CASIO. Dans ce tutoriel, on va voir comment compiler GCC à la main. J'y mentionne également par le symbole les étapes supplémentaires nécessaires pour installer le fxSDK tout entier à la main.

Ce tutoriel était initialement utilisé pour toutes les installation de GCC pour la calculatrice, mais il y a maintenant des méthodes automatiques via le dépôt sh-elf-gcc, via MiddleArch ou même l'installation complète du fxSDK avec GiteaPC. Le texte ci-dessous est donc destiné à des personnes relativement expérimentées avec le terminal et les processus classiques de compilation, et spécifiquement à ceux qui voudraient tester des configurations inhabituelles. Pour relire l'ancien tutoriel, voir sur la forge Gitea.

Ce tutoriel est écrit pour Linux mais vous pouvez le suivre sous Windows 10 en utilisant WSL qui vous donnera accès à Ubuntu.

1. Présentation du processus

Dans ce tutoriel, on va compiler plusieurs logiciels. Côté compilateur, d'abord binutils, une suite de programmes qui gère l'assembleur, les fichiers objets, les bibliothèques, et l'édition des liens ; puis GCC, le compilateur C/C++ en lui-même.

Ensuite on va faire un détour par le fxSDK pour installer la bibliothèque mathématique et la bibliothèque standard C qui sont nécessaires pour avoir accès à la totalité du langage C.

On reviendra alors vers GCC, puisqu'une fois la lib standard C installée on peut compiler la bibliothèque standard C++, qui est là aussi nécessaire pour avoir accès à la totalité du langage C++.

Enfin on pourra finir l'installation du fxSDK avec gint et d'autres bibliothèques.

[fxSDK] Commencez par installer le dépôt fxsdk, qui fournit la sysroot dans laquelle on va installer le compilateur. C'est un cmake/make classique.

2. Installation des dépendances

Nos calculatrices utilisent des processeurs de la famille SuperH, on ne peut donc pas utiliser le même compilateur C que quand on programme pour l'ordinateur. On va utiliser un cross-compilateur qui ne s'appelera pas gcc mais sh-elf-gcc, attention à ne pas confondre !

Téléchargez la dernière version de binutils (téléchargement ici) ainsi que la dernière version de GCC (téléchargement ici). En cas d'erreur insondable, vous pourrez toujours tenter d'autres versions plus tard.

Attention : Si votre GCC système est en version 12.1 ou 12.2 (tapez gcc -v pour le déterminer), vous devez prendre GCC 11.1 pour la calculatrice à cause de ce bug de GCC pour x86_64.

Bien sûr GCC est un logiciel complexe avec pas mal de dépendances. Voici de quoi les installer :

# Pour Debian, Ubuntu, Mint, WSL pour Windows, et autres dérivés de Debian :
% sudo apt install libmpfr-dev libmpc-dev libgmp-dev libpng-dev libppl-dev flex g++ git texinfo
# Pour Arch Linux, Manjaro, et autres dérivés de Arch :
% sudo pacman -S mpfr libmpc gmp libpng ppl flex gcc git texinfo

  • MPFR : calcul flottant à précision arbitraire
  • MPC : calcul complexe à précision arbitraire
  • GMP : arithmétique entière multi-précision
  • libPNG : manipulations d'images PNG
  • PPL : optimisation polyhédrique (optimisation magique)
  • flex : générateur d'analyseurs lexicaux
  • g++ : compilateur C++ pour votre système
  • git : gestionnaire de versions
  • texinfo : générateur de documentation formatée

3. Préparation de l'environnement de compilation

Le compilateur et toutes les bibliothèques pour la calculatrice vont être installées dans un même dossier. Si vous utilisez le fxSDK, ce dossier est pré-choisi et la commande fxsdk path sysroot vous l'affiche. Sinon vous pouvez aller où vous voulez, mais restez dans votre dossier personnel.

% export PREFIX="$(fxsdk path sysroot)"
# Exemple de dossier hors fxSDK :
# export PREFIX="$HOME/opt/sh-elf-2.39-11.1.0"

% mkdir -p $PREFIX

Assurez-vous que $PREFIX/bin est dans votre PATH. Extrayez le contenu des archives que vous avez téléchargées dans un dossier temporaire, et créez deux répertoires build-binutils et build-gcc.

% tar -xJf binutils-2.39.tar.xz
% tar -xJf gcc-11.1.0.tar.xz
% mkdir build-binutils build-gcc

On va ensuite appliquer quelques patchs. On va d'abord toucher un fichier de binutils pour éviter la régénération d'un parser avec bison qui ne marche plus depuis longtemps :

% touch binutils-2.39/intl/plural.c

Si vous utilisez GCC 11.1 (et sans doute quelques versions d'avant), téléchargez de plus ce patch qui désactive des tests de configuration inutilement aggressifs dans la lib C++ et appliquez-le :

% patch -u -N -p0 < gcc-11.1.0-libstdc++-v3-skip-dlopen.patch

4. Compilation de binutils

La compilation de binutils est un configure/make classique. Les options qu'on utilise sont :

  • --prefix pour indiquer le dossier d'installation final.
  • --target="sh3eb-elf" pour spécifier qu'on veut un cross-compilateur pour SuperH.
  • --with-multilib-list="m3,m4-nofpu" indique plus précisément qu'on veut une variante pour SH3 et une pour SH4 sans FPU.
  • --program-prefix="sh-elf-" renomme le compilateur de sh3eb-elf-gcc à sh-elf-gcc vu qu'on a aussi le SH3.

Il n'y a pas beaucoup d'autres options intéressantes, mais vous pouvez les voir toutes avec configure --help.

% cd build-binutils
% ../binutils-2.39/configure --prefix="$PREFIX" --target="sh3eb-elf" --with-multilib-list="m3,m4-nofpu" --program-prefix="sh-elf-"

Une fois que tout est configuré, il n'y a plus qu'à compiler et à installer. Normalement ça va assez vite, comptez quelques minutes.

% make -j4
% make install-strip

Les exécutables de binutils ont dû apparaître dans $PREFIX/bin Essayez sh-elf-ld --version qui doit vous renvoyer la version de binutils (ici 2.39).

5. Compilation de gcc et de libgcc

Ensuite c'est pareil mais pour GCC. En plus des options précédentes, on indique :

  • --enable-languages="c,c++" qui spécifie les compilateurs qu'on veut. Si vous voulez expérimenter avec d'autres langages notamment Ada, D, Go ou Fortran, c'est là qu'il faut commencer !
  • --without-headers qui indique essentiellement qu'on veut un cross-compilateur.
  • --enable-clocale="generic" qui simplifie le module <locale> de la lib C++.
  • --enable-libstdcxx-allocator qui fait de même avec les allocateurs mémoire.
  • --disable-threads qui désactive le threading (qu'on n'a pas).
  • --disable-libstdcxx-verbose qui élimine des logs dans la lib C++.
  • --enable-cxx-flags="-fno-exceptions" qui désactive les exceptions durant la compilation de la lib C++.

Voyez le guide de configuration pour toutes les options utiles.

% cd "$PREFIX/build-gcc"
% ../gcc-11.1.0/configure --prefix="$PREFIX" --target="sh3eb-elf" --with-multilib-list="m3,m4-nofpu" --enable-languages="c,c++" --without-headers --program-prefix="sh-elf-" --enable-clocale="generic" --enable-libstdcxx-allocator --disable-threads --disable-libstdcxx-verbose --enable-cxx-flags="-fno-exceptions

Cette fois la compilation occupera entre 10 et 30 minutes... ou 5/6 heures sur un vieux Raspberry Pi.

% make -j4 all-gcc all-target-libgcc
% make install-strip-gcc install-strip-target-libgcc

Avec ça vous devez pouvoir taper sh-elf-gcc -v et la version et les options de compilation.

[fxSDK] C'est le moment d'installer OpenLibm, avec make.
[fxSDK] Installez aussi la lib C, fxlibc, un autre cmake/make classique.

6. Compilation de libstdc++

On peut maintenant revenir dans le dossier de compilation de GCC et compiler des libs plus évoluées, comme la lib C++. Si vous testez d'autres langages (par exemple D) c'est le moment de compiler les libs qui vont avec (libphobos), ou même de compiler libssl, libiberty, etc. selon vos goûts.

% make -j4 all-target-libstdc++-v3
% make install-strip-target-libstdc++-v3

Et voilà, la toolchain est complète. Si vous manquez d'espace disque vous pouvez supprimez les archives, dossiers de sources, et dossiers de build de binutils et GCC.

Vous pouvez aussi installer gdb dans la même veine que binutils pour pouvoir debugger les add-ins à distance.

[fxSDK] Installez maintenant gint, et les autres libs qui vous plaisent (eg. libprof, zlib, etc).

Et voilà, vous avez un compilateur C/C++ complet voire un SDK complet pour programmer des add-ins.

Fichier joint


Précédente 1, 2, 3 ··· 10 ··· 20, 21, 22, 23, 24, 25 Suivante
Palpatine_78 Hors ligne Membre Points: 264 Défis: 0 Message

Citer : Posté le 18/06/2021 10:35 | #


Merci!
J'ai ajouté ces deux lignes avant le prepare() du PKGBUILD, et les erreurs sont devenues des Warnings
Lephenixnoir En ligne Administrateur Points: 24225 Défis: 170 Message

Citer : Posté le 18/06/2021 10:38 | #


Excellent ! o/
Mon graphe (11 Avril): ((Rogue Life || HH2) ; PythonExtra ; serial gint ; Boson X ; passe gint 3 ; ...) || (shoutbox v5 ; v5)
Dark storm Hors ligne Labélisateur Points: 11634 Défis: 176 Message

Citer : Posté le 18/06/2021 11:18 | #


Bien vu. J'ai des updates à faire d'ailleurs, j'en profiterais pour intégrer ça.

Au passage, si tu veux j'ai déjà compilé les paquets. C'est disponible sur MiddleArch
Finir est souvent bien plus difficile que commencer. — Jack Beauregard
Neiviv-ui Hors ligne Membre Points: 29 Défis: 0 Message

Citer : Posté le 22/06/2021 19:43 | #


Quelques avancées sur le projet de "portage" pour Android :

--> Finalement j'ai parlé trop vite, puisque cette histoire de code à position indépendante est résolue (en tout cas ça en a l'air, puisque ça fonctionne et ça ne paraît pas être la source des problèmes suivants, étant donné que en faisant la même manip sur un ordi, la compilation se passe sans problèmes).

--> de nouvelles erreurs sont apparues :
make[1]: Entering directory '/data/data/com.termux/files/home/sh-elf-gcc/build'
make[2]: Entering directory '/data/data/com.termux/files/home/sh-elf-gcc/build/libiberty'
make[2]: Entering directory '/data/data/com.termux/files/home/sh-elf-gcc/build/intl'
rm -f stamp-h1
/bin/sh ./config.status config.h
make[2]: Entering directory '/data/data/com.termux/files/home/sh-elf-gcc/build/build-armv7l-unknown-linux-gnueabi/libiberty'
make[3]: Entering directory '/data/data/com.termux/files/home/sh-elf-gcc/build/libiberty/testsuite'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/data/data/com.termux/files/home/sh-elf-gcc/build/libiberty/testsuite'
make[2]: Leaving directory '/data/data/com.termux/files/home/sh-elf-gcc/build/libiberty'
make[2]: Entering directory '/data/data/com.termux/files/home/sh-elf-gcc/build/libbacktrace'
make[3]: Entering directory '/data/data/com.termux/files/home/sh-elf-gcc/build/build-armv7l-unknown-linux-gnueabi/libiberty/testsuite'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/data/data/com.termux/files/home/sh-elf-gcc/build/build-armv7l-unknown-linux-gnueabi/libiberty/testsuite'
make  all-am
make[2]: Leaving directory '/data/data/com.termux/files/home/sh-elf-gcc/build/build-armv7l-unknown-linux-gnueabi/libiberty'
make[2]: Entering directory '/data/data/com.termux/files/home/sh-elf-gcc/build/libcody'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/data/data/com.termux/files/home/sh-elf-gcc/build/libcody'
make[2]: Entering directory '/data/data/com.termux/files/home/sh-elf-gcc/build/libdecnumber'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/data/data/com.termux/files/home/sh-elf-gcc/build/libdecnumber'
make[3]: Entering directory '/data/data/com.termux/files/home/sh-elf-gcc/build/libbacktrace'
true  DO=all multi-do # make
make[3]: Leaving directory '/data/data/com.termux/files/home/sh-elf-gcc/build/libbacktrace'
make[2]: Leaving directory '/data/data/com.termux/files/home/sh-elf-gcc/build/libbacktrace'
make[2]: Entering directory '/data/data/com.termux/files/home/sh-elf-gcc/build/zlib'
true "AR_FLAGS=rc" "CC_FOR_BUILD=gcc" "CFLAGS=-D__ANDROID_API__=29 -g -O2" "CXXFLAGS=-D__ANDROID_API__=29 -g -O2" "CFLAGS_FOR_BUILD=-D__ANDROID_API__=29 -g -O2" "CFLAGS_FOR_TARGET=-g -O2" "INSTALL=/data/data/com.termux/files/usr/bin/install -c" "INSTALL_DATA=/data/data/com.termux/files/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/data/data/com.termux/files/usr/bin/install -c" "INSTALL_SCRIPT=/data/data/com.termux/files/usr/bin/install -c" "LDFLAGS=" "LIBCFLAGS=-D__ANDROID_API__=29 -g -O2" "LIBCFLAGS_FOR_TARGET=-g -O2" "MAKE=make" "MAKEINFO=makeinfo --split-size=5000000 " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/sh" "EXPECT=expect" "RUNTEST=runtest" "RUNTESTFLAGS=" "exec_prefix=/data/data/com.termux/files/home/sh-elf-gcc" "infodir=/data/data/com.termux/files/home/sh-elf-gcc/share/info" "libdir=/data/data/com.termux/files/home/sh-elf-gcc/lib" "prefix=/data/data/com.termux/files/home/sh-elf-gcc" "tooldir=/data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf" "AR=ar" "AS=as" "CC=gcc" "CXX=g++" "LD=/data/data/com.termux/files/usr/bin/ld" "LIBCFLAGS=-D__ANDROID_API__=29 -g -O2" "NM=nm" "PICFLAG=" "RANLIB=ranlib" "DESTDIR=" DO=all multi-do # make
make[2]: Leaving directory '/data/data/com.termux/files/home/sh-elf-gcc/build/zlib'
make[2]: Entering directory '/data/data/com.termux/files/home/sh-elf-gcc/build/lto-plugin'
make[2]: Entering directory '/data/data/com.termux/files/home/sh-elf-gcc/build/fixincludes'
make[2]: Entering directory '/data/data/com.termux/files/home/sh-elf-gcc/build/build-armv7l-unknown-linux-gnueabi/fixincludes'
make  all-am
make[3]: Entering directory '/data/data/com.termux/files/home/sh-elf-gcc/build/lto-plugin'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/data/data/com.termux/files/home/sh-elf-gcc/build/fixincludes'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/data/data/com.termux/files/home/sh-elf-gcc/build/build-armv7l-unknown-linux-gnueabi/fixincludes'
config.status: creating config.h
make[2]: Entering directory '/data/data/com.termux/files/home/sh-elf-gcc/build/build-armv7l-unknown-linux-gnueabi/libcpp'
test -f config.h || (rm -f stamp-h1 && make stamp-h1)
make[2]: Leaving directory '/data/data/com.termux/files/home/sh-elf-gcc/build/build-armv7l-unknown-linux-gnueabi/libcpp'
make[3]: Leaving directory '/data/data/com.termux/files/home/sh-elf-gcc/build/lto-plugin'
make[2]: Leaving directory '/data/data/com.termux/files/home/sh-elf-gcc/build/lto-plugin'
config.status: config.h is unchanged
test -f config.h || (rm -f stamp-h1 && make stamp-h1)
make[2]: Leaving directory '/data/data/com.termux/files/home/sh-elf-gcc/build/intl'
make[2]: Entering directory '/data/data/com.termux/files/home/sh-elf-gcc/build/libcpp'
test -f config.h || (rm -f stamp-h1 && make stamp-h1)
make[2]: Leaving directory '/data/data/com.termux/files/home/sh-elf-gcc/build/libcpp'
make[2]: Entering directory '/data/data/com.termux/files/home/sh-elf-gcc/build/gcc'
Makefile:2765: warning: overriding recipe for target 'gt-sh.h'
../../gcc-11.1.0/gcc/config/sh/t-sh:93: warning: ignoring old recipe for target 'gt-sh.h'
make[2]: Leaving directory '/data/data/com.termux/files/home/sh-elf-gcc/build/gcc'
Checking multilib configuration for libgcc...
make[2]: Entering directory '/data/data/com.termux/files/home/sh-elf-gcc/build/sh3eb-elf/libgcc'
# If this is the top-level multilib, build all the other
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/xgcc -B/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/ -B/data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/bin/ -B/data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/lib/ -isystem /data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/include -isystem /data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/sys-include    -g -O2 -O2  -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wstrict-prototypes -Wmissing-prototypes -Wno-error=format-diag -Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -I. -I. -I../.././gcc -I../../../gcc-11.1.0/libgcc -I../../../gcc-11.1.0/libgcc/. -I../../../gcc-11.1.0/libgcc/../gcc -I../../../gcc-11.1.0/libgcc/../include  -DHAVE_CC_TLS  -o _ashiftrt_s.o -MT _ashiftrt_s.o -MD -MP -MF _ashiftrt_s.dep -DSHARED -DL_ashiftrt -xassembler-with-cpp -c ../../../gcc-11.1.0/libgcc/config/sh/lib1funcs.S
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/nm -pg _ashiftrt_n_s.o | gawk 'NF == 3 && $2 !~ /^[UN]$/ && $3 !~ /.*_compat/ && $3 !~ /.*@.*/ { print "\t.hidden", $3 }' > _ashiftrt_n.visT
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/nm -pg _ashiftlt_s.o | gawk 'NF == 3 && $2 !~ /^[UN]$/ && $3 !~ /.*_compat/ && $3 !~ /.*@.*/ { print "\t.hidden", $3 }' > _ashiftlt.visT
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/nm -pg _lshiftrt_s.o | gawk 'NF == 3 && $2 !~ /^[UN]$/ && $3 !~ /.*_compat/ && $3 !~ /.*@.*/ { print "\t.hidden", $3 }' > _lshiftrt.visT
# multilibs.
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/xgcc -B/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/ -B/data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/bin/ -B/data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/lib/ -isystem /data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/include -isystem /data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/sys-include    -g -O2 -O2  -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wstrict-prototypes -Wmissing-prototypes -Wno-error=format-diag -Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -I. -I. -I../.././gcc -I../../../gcc-11.1.0/libgcc -I../../../gcc-11.1.0/libgcc/. -I../../../gcc-11.1.0/libgcc/../gcc -I../../../gcc-11.1.0/libgcc/../include  -DHAVE_CC_TLS  -o _movmem_s.o -MT _movmem_s.o -MD -MP -MF _movmem_s.dep -DSHARED -DL_movmem -xassembler-with-cpp -c ../../../gcc-11.1.0/libgcc/config/sh/lib1funcs.S
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/nm -pg _movmem_i4_s.o | gawk 'NF == 3 && $2 !~ /^[UN]$/ && $3 !~ /.*_compat/ && $3 !~ /.*@.*/ { print "\t.hidden", $3 }' > _movmem_i4.visT
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/nm -pg _mulsi3_s.o | gawk 'NF == 3 && $2 !~ /^[UN]$/ && $3 !~ /.*_compat/ && $3 !~ /.*@.*/ { print "\t.hidden", $3 }' > _mulsi3.visT
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/nm: 106: exec: -pg: not found
mv -f _ashiftlt.visT _ashiftlt.vis
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/nm: 106: exec: -pg: not found
make[3]: Entering directory '/data/data/com.termux/files/home/sh-elf-gcc/build/sh3eb-elf/libgcc'
mv -f _lshiftrt.visT _lshiftrt.vis
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/nm: 106: exec: -pg: not found
mv -f _ashiftrt_n.visT _ashiftrt_n.vis
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/nm: 106: exec: -pg: not found
mv -f _mulsi3.visT _mulsi3.vis
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/nm: 106: exec: -pg: not found
mv -f _movmem_i4.visT _movmem_i4.vis
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/xgcc -B/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/ -B/data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/bin/ -B/data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/lib/ -isystem /data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/include -isystem /data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/sys-include    -g -O2 -O2  -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wstrict-prototypes -Wmissing-prototypes -Wno-error=format-diag -Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -I. -I. -I../.././gcc -I../../../gcc-11.1.0/libgcc -I../../../gcc-11.1.0/libgcc/. -I../../../gcc-11.1.0/libgcc/../gcc -I../../../gcc-11.1.0/libgcc/../include  -DHAVE_CC_TLS  -o _sdivsi3_s.o -MT _sdivsi3_s.o -MD -MP -MF _sdivsi3_s.dep -DSHARED -DL_sdivsi3 -xassembler-with-cpp -c ../../../gcc-11.1.0/libgcc/config/sh/lib1funcs.S
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/xgcc -B/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/ -B/data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/bin/ -B/data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/lib/ -isystem /data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/include -isystem /data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/sys-include    -g -O2 -O2  -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wstrict-prototypes -Wmissing-prototypes -Wno-error=format-diag -Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -I. -I. -I../.././gcc -I../../../gcc-11.1.0/libgcc -I../../../gcc-11.1.0/libgcc/. -I../../../gcc-11.1.0/libgcc/../gcc -I../../../gcc-11.1.0/libgcc/../include  -DHAVE_CC_TLS  -o _sdivsi3_i4_s.o -MT _sdivsi3_i4_s.o -MD -MP -MF _sdivsi3_i4_s.dep -DSHARED -DL_sdivsi3_i4 -xassembler-with-cpp -c ../../../gcc-11.1.0/libgcc/config/sh/lib1funcs.S
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/xgcc -B/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/ -B/data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/bin/ -B/data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/lib/ -isystem /data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/include -isystem /data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/sys-include    -g -O2 -O2  -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wstrict-prototypes -Wmissing-prototypes -Wno-error=format-diag -Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -I. -I. -I../.././gcc -I../../../gcc-11.1.0/libgcc -I../../../gcc-11.1.0/libgcc/. -I../../../gcc-11.1.0/libgcc/../gcc -I../../../gcc-11.1.0/libgcc/../include  -DHAVE_CC_TLS  -o _udivsi3_s.o -MT _udivsi3_s.o -MD -MP -MF _udivsi3_s.dep -DSHARED -DL_udivsi3 -xassembler-with-cpp -c ../../../gcc-11.1.0/libgcc/config/sh/lib1funcs.S
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/xgcc -B/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/ -B/data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/bin/ -B/data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/lib/ -isystem /data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/include -isystem /data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/sys-include    -g -O2 -O2  -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wstrict-prototypes -Wmissing-prototypes -Wno-error=format-diag -Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -I. -I. -I../.././gcc -I../../../gcc-11.1.0/libgcc -I../../../gcc-11.1.0/libgcc/. -I../../../gcc-11.1.0/libgcc/../gcc -I../../../gcc-11.1.0/libgcc/../include  -DHAVE_CC_TLS  -o _udivsi3_i4_s.o -MT _udivsi3_i4_s.o -MD -MP -MF _udivsi3_i4_s.dep -DSHARED -DL_udivsi3_i4 -xassembler-with-cpp -c ../../../gcc-11.1.0/libgcc/config/sh/lib1funcs.S
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/xgcc -B/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/ -B/data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/bin/ -B/data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/lib/ -isystem /data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/include -isystem /data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/sys-include    -g -O2 -O2  -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wstrict-prototypes -Wmissing-prototypes -Wno-error=format-diag -Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -I. -I. -I../.././gcc -I../../../gcc-11.1.0/libgcc -I../../../gcc-11.1.0/libgcc/. -I../../../gcc-11.1.0/libgcc/../gcc -I../../../gcc-11.1.0/libgcc/../include  -DHAVE_CC_TLS  -o _set_fpscr_s.o -MT _set_fpscr_s.o -MD -MP -MF _set_fpscr_s.dep -DSHARED -DL_set_fpscr -xassembler-with-cpp -c ../../../gcc-11.1.0/libgcc/config/sh/lib1funcs.S
make[4]: Entering directory '/data/data/com.termux/files/home/sh-elf-gcc/build/sh3eb-elf/m4-nofpu/libgcc'
/data/data/com.termux/files/usr/tmp/ccDMRijb.s: /data/data/com.termux/files/usr/tmp/ccdRp7Ob.s: /data/data/com.termux/files/usr/tmp/ccb4KRqZ.s: /data/data/com.termux/files/usr/tmp/ccKc25r0.s: /data/data/com.termux/files/usr/tmp/cclA1LrY.s: Assembler messages:
Assembler messages:
Assembler messages:
Assembler messages:
Assembler messages:
/data/data/com.termux/files/usr/tmp/ccb4KRqZ.s: Warning: end of file in comment; newline inserted
/data/data/com.termux/files/usr/tmp/ccDMRijb.s: Warning: end of file in comment; newline inserted
/data/data/com.termux/files/usr/tmp/ccdRp7Ob.s: Warning: end of file in comment; newline inserted
/data/data/com.termux/files/usr/tmp/ccKc25r0.s: Warning: end of file in comment; newline inserted
/data/data/com.termux/files/usr/tmp/cclA1LrY.s: Warning: end of file in comment; newline inserted
/data/data/com.termux/files/usr/tmp/ccPeWp5n.s: Assembler messages:
/data/data/com.termux/files/usr/tmp/ccPeWp5n.s: Error: .size expression for ___ashiftrt_r4_18 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccPeWp5n.s: Error: .size expression for ___ashiftrt_r4_19 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccPeWp5n.s: Error: .size expression for ___ashiftrt_r4_20 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccPeWp5n.s: Error: .size expression for ___ashiftrt_r4_21 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccPeWp5n.s: Error: .size expression for ___ashiftrt_r4_22 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccPeWp5n.s: Error: .size expression for ___ashiftrt_r4_23 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccPeWp5n.s: Error: .size expression for ___ashiftrt_r4_24 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccPeWp5n.s: Error: .size expression for ___ashiftrt_r4_25 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccPeWp5n.s: Error: .size expression for ___ashiftrt_r4_26 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccPeWp5n.s: Error: .size expression for ___ashiftrt_r4_27 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccPeWp5n.s: Error: .size expression for ___ashiftrt_r4_28 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccPeWp5n.s: Error: .size expression for ___ashiftrt_r4_29 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccPeWp5n.s: Error: .size expression for ___ashiftrt_r4_30 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccPeWp5n.s: Error: .size expression for ___ashiftrt_r4_31 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccPeWp5n.s: Error: .size expression for ___ashiftrt_r4_32 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccgeTLTi.s: Assembler messages:
/data/data/com.termux/files/usr/tmp/ccgeTLTi.s: Error: .size expression for ___movmemSI64 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccgeTLTi.s: Error: .size expression for ___movmemSI60 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccgeTLTi.s: Error: .size expression for ___movmemSI56 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccgeTLTi.s: Error: .size expression for ___movmemSI52 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccgeTLTi.s: Error: .size expression for ___movmemSI48 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccgeTLTi.s: Error: .size expression for ___movmemSI44 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccgeTLTi.s: Error: .size expression for ___movmemSI40 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccgeTLTi.s: Error: .size expression for ___movmemSI36 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccgeTLTi.s: Error: .size expression for ___movmemSI32 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccgeTLTi.s: Error: .size expression for ___movmemSI28 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccgeTLTi.s: Error: .size expression for ___movmemSI24 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccgeTLTi.s: Error: .size expression for ___movmemSI20 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccgeTLTi.s: Error: .size expression for ___movmem does not evaluate to a constant
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/xgcc -B/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/ -B/data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/bin/ -B/data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/lib/ -isystem /data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/include -isystem /data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/sys-include    -g -O2 -O2  -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wstrict-prototypes -Wmissing-prototypes -Wno-error=format-diag -Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -I. -I. -I../.././gcc -I../../../gcc-11.1.0/libgcc -I../../../gcc-11.1.0/libgcc/. -I../../../gcc-11.1.0/libgcc/../gcc -I../../../gcc-11.1.0/libgcc/../include  -DHAVE_CC_TLS  -o _div_table_s.o -MT _div_table_s.o -MD -MP -MF _div_table_s.dep -DSHARED -DL_div_table -xassembler-with-cpp -c ../../../gcc-11.1.0/libgcc/config/sh/lib1funcs.S
make[2]: *** [Makefile:491: _ashiftrt_s.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:491: _movmem_s.o] Error 1
# If this is the top-level multilib, build all the other
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/xgcc -B/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/ -B/data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/bin/ -B/data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/lib/ -isystem /data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/include -isystem /data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/sys-include    -g -O2 -m4-nofpu -O2  -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wstrict-prototypes -Wmissing-prototypes -Wno-error=format-diag -Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -I. -I. -I../../.././gcc -I../../../../gcc-11.1.0/libgcc -I../../../../gcc-11.1.0/libgcc/. -I../../../../gcc-11.1.0/libgcc/../gcc -I../../../../gcc-11.1.0/libgcc/../include  -DHAVE_CC_TLS  -o _ashiftrt_s.o -MT _ashiftrt_s.o -MD -MP -MF _ashiftrt_s.dep -DSHARED -DL_ashiftrt -xassembler-with-cpp -c ../../../../gcc-11.1.0/libgcc/config/sh/lib1funcs.S
/data/data/com.termux/files/usr/tmp/ccXVHe5L.s: Assembler messages:
/data/data/com.termux/files/usr/tmp/ccXVHe5L.s:12: Error: displacement to undefined symbol .L_div_ge64k_neg_end overflows 12-bit field
/data/data/com.termux/files/usr/tmp/ccXVHe5L.s:29: Error: displacement to undefined symbol .L_div_r8_neg_end overflows 12-bit field
/data/data/com.termux/files/usr/tmp/ccXVHe5L.s: Error: .size expression for ___sdivsi3_i4i does not evaluate to a constant
make[2]: *** [Makefile:491: _div_table_s.o] Error 1
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/nm -pg _ashiftrt_n_s.o | gawk 'NF == 3 && $2 !~ /^[UN]$/ && $3 !~ /.*_compat/ && $3 !~ /.*@.*/ { print "\t.hidden", $3 }' > _ashiftrt_n.visT
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/nm -pg _ashiftlt_s.o | gawk 'NF == 3 && $2 !~ /^[UN]$/ && $3 !~ /.*_compat/ && $3 !~ /.*@.*/ { print "\t.hidden", $3 }' > _ashiftlt.visT
# multilibs.
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/nm -pg _lshiftrt_s.o | gawk 'NF == 3 && $2 !~ /^[UN]$/ && $3 !~ /.*_compat/ && $3 !~ /.*@.*/ { print "\t.hidden", $3 }' > _lshiftrt.visT
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/xgcc -B/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/ -B/data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/bin/ -B/data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/lib/ -isystem /data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/include -isystem /data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/sys-include    -g -O2 -m4-nofpu -O2  -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wstrict-prototypes -Wmissing-prototypes -Wno-error=format-diag -Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -I. -I. -I../../.././gcc -I../../../../gcc-11.1.0/libgcc -I../../../../gcc-11.1.0/libgcc/. -I../../../../gcc-11.1.0/libgcc/../gcc -I../../../../gcc-11.1.0/libgcc/../include  -DHAVE_CC_TLS  -o _movmem_s.o -MT _movmem_s.o -MD -MP -MF _movmem_s.dep -DSHARED -DL_movmem -xassembler-with-cpp -c ../../../../gcc-11.1.0/libgcc/config/sh/lib1funcs.S
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/nm -pg _movmem_i4_s.o | gawk 'NF == 3 && $2 !~ /^[UN]$/ && $3 !~ /.*_compat/ && $3 !~ /.*@.*/ { print "\t.hidden", $3 }' > _movmem_i4.visT
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/nm -pg _mulsi3_s.o | gawk 'NF == 3 && $2 !~ /^[UN]$/ && $3 !~ /.*_compat/ && $3 !~ /.*@.*/ { print "\t.hidden", $3 }' > _mulsi3.visT
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/nm: 106: exec: -pg: not found
mv -f _ashiftrt_n.visT _ashiftrt_n.vis
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/nm: 106: exec: -pg: not found
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/nm: 106: exec: -pg: not found
mv -f _lshiftrt.visT _lshiftrt.vis
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/nm: 106: exec: /data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/nm: 106: exec: -pg: not found-pg: not found

mv -f _mulsi3.visT _mulsi3.vis
mv -f _ashiftlt.visT _ashiftlt.vis
mv -f _movmem_i4.visT _movmem_i4.vis
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/nm -pg _sdivsi3_s.o | gawk 'NF == 3 && $2 !~ /^[UN]$/ && $3 !~ /.*_compat/ && $3 !~ /.*@.*/ { print "\t.hidden", $3 }' > _sdivsi3.visT
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/xgcc -B/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/ -B/data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/bin/ -B/data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/lib/ -isystem /data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/include -isystem /data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/sys-include    -g -O2 -m4-nofpu -O2  -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wstrict-prototypes -Wmissing-prototypes -Wno-error=format-diag -Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -I. -I. -I../../.././gcc -I../../../../gcc-11.1.0/libgcc -I../../../../gcc-11.1.0/libgcc/. -I../../../../gcc-11.1.0/libgcc/../gcc -I../../../../gcc-11.1.0/libgcc/../include  -DHAVE_CC_TLS  -o _sdivsi3_i4_s.o -MT _sdivsi3_i4_s.o -MD -MP -MF _sdivsi3_i4_s.dep -DSHARED -DL_sdivsi3_i4 -xassembler-with-cpp -c ../../../../gcc-11.1.0/libgcc/config/sh/lib1funcs.S
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/xgcc -B/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/ -B/data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/bin/ -B/data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/lib/ -isystem /data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/include -isystem /data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/sys-include    -g -O2 -m4-nofpu -O2  -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wstrict-prototypes -Wmissing-prototypes -Wno-error=format-diag -Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -I. -I. -I../../.././gcc -I../../../../gcc-11.1.0/libgcc -I../../../../gcc-11.1.0/libgcc/. -I../../../../gcc-11.1.0/libgcc/../gcc -I../../../../gcc-11.1.0/libgcc/../include  -DHAVE_CC_TLS  -o _udivsi3_s.o -MT _udivsi3_s.o -MD -MP -MF _udivsi3_s.dep -DSHARED -DL_udivsi3 -xassembler-with-cpp -c ../../../../gcc-11.1.0/libgcc/config/sh/lib1funcs.S
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/xgcc -B/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/ -B/data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/bin/ -B/data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/lib/ -isystem /data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/include -isystem /data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/sys-include    -g -O2 -m4-nofpu -O2  -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wstrict-prototypes -Wmissing-prototypes -Wno-error=format-diag -Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -I. -I. -I../../.././gcc -I../../../../gcc-11.1.0/libgcc -I../../../../gcc-11.1.0/libgcc/. -I../../../../gcc-11.1.0/libgcc/../gcc -I../../../../gcc-11.1.0/libgcc/../include  -DHAVE_CC_TLS  -o _udivsi3_i4_s.o -MT _udivsi3_i4_s.o -MD -MP -MF _udivsi3_i4_s.dep -DSHARED -DL_udivsi3_i4 -xassembler-with-cpp -c ../../../../gcc-11.1.0/libgcc/config/sh/lib1funcs.S
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/xgcc -B/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/ -B/data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/bin/ -B/data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/lib/ -isystem /data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/include -isystem /data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/sys-include    -g -O2 -m4-nofpu -O2  -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wstrict-prototypes -Wmissing-prototypes -Wno-error=format-diag -Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -I. -I. -I../../.././gcc -I../../../../gcc-11.1.0/libgcc -I../../../../gcc-11.1.0/libgcc/. -I../../../../gcc-11.1.0/libgcc/../gcc -I../../../../gcc-11.1.0/libgcc/../include  -DHAVE_CC_TLS  -o _set_fpscr_s.o -MT _set_fpscr_s.o -MD -MP -MF _set_fpscr_s.dep -DSHARED -DL_set_fpscr -xassembler-with-cpp -c ../../../../gcc-11.1.0/libgcc/config/sh/lib1funcs.S
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/xgcc -B/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/ -B/data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/bin/ -B/data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/lib/ -isystem /data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/include -isystem /data/data/com.termux/files/home/sh-elf-gcc/sh3eb-elf/sys-include    -g -O2 -m4-nofpu -O2  -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wstrict-prototypes -Wmissing-prototypes -Wno-error=format-diag -Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -I. -I. -I../../.././gcc -I../../../../gcc-11.1.0/libgcc -I../../../../gcc-11.1.0/libgcc/. -I../../../../gcc-11.1.0/libgcc/../gcc -I../../../../gcc-11.1.0/libgcc/../include  -DHAVE_CC_TLS  -o _div_table_s.o -MT _div_table_s.o -MD -MP -MF _div_table_s.dep -DSHARED -DL_div_table -xassembler-with-cpp -c ../../../../gcc-11.1.0/libgcc/config/sh/lib1funcs.S
/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/nm: 106: exec: -pg: not found
/data/data/com.termux/files/usr/tmp/cczNtXER.s: Assembler messages:
/data/data/com.termux/files/usr/tmp/cczNtXER.s: Error: .size expression for ___ashiftrt_r4_19 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/cczNtXER.s: Error: .size expression for ___ashiftrt_r4_20 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/cczNtXER.s: Error: .size expression for ___ashiftrt_r4_21 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/cczNtXER.s: Error: .size expression for ___ashiftrt_r4_22 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/cczNtXER.s: Error: .size expression for ___ashiftrt_r4_23 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/cczNtXER.s: Error: .size expression for ___ashiftrt_r4_24 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/cczNtXER.s: Error: .size expression for ___ashiftrt_r4_25 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/cczNtXER.s: Error: .size expression for ___ashiftrt_r4_26 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/cczNtXER.s: Error: .size expression for ___ashiftrt_r4_27 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/cczNtXER.s: Error: .size expression for ___ashiftrt_r4_28 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/cczNtXER.s: Error: .size expression for ___ashiftrt_r4_29 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/cczNtXER.s: Error: .size expression for ___ashiftrt_r4_30 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/cczNtXER.s: Error: .size expression for ___ashiftrt_r4_31 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/cczNtXER.s: Error: .size expression for ___ashiftrt_r4_32 does not evaluate to a constant
mv -f _sdivsi3.visT _sdivsi3.vis
make[4]: *** [Makefile:491: _ashiftrt_s.o] Error 1
make[4]: *** Waiting for unfinished jobs....
/data/data/com.termux/files/usr/tmp/ccXzZERa.s: Assembler messages:
/data/data/com.termux/files/usr/tmp/ccXzZERa.s: Error: .size expression for ___movmemSI64 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccXzZERa.s: Error: .size expression for ___movmemSI60 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccXzZERa.s: Error: .size expression for ___movmemSI56 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccXzZERa.s: Error: .size expression for ___movmemSI52 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccXzZERa.s: Error: .size expression for ___movmemSI48 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccXzZERa.s: Error: .size expression for ___movmemSI44 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccXzZERa.s: Error: .size expression for ___movmemSI40 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccXzZERa.s: Error: .size expression for ___movmemSI36 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccXzZERa.s: Error: .size expression for ___movmemSI32 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccXzZERa.s: Error: .size expression for ___movmemSI28 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccXzZERa.s: Error: .size expression for ___movmemSI24 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccXzZERa.s: Error: .size expression for ___movmemSI20 does not evaluate to a constant
/data/data/com.termux/files/usr/tmp/ccXzZERa.s: Error: .size expression for ___movmem does not evaluate to a constant
make[4]: *** [Makefile:491: _movmem_s.o] Error 1
/data/data/com.termux/files/usr/tmp/ccujVERU.s: Assembler messages:
/data/data/com.termux/files/usr/tmp/ccujVERU.s: Warning: end of file in comment; newline inserted
/data/data/com.termux/files/usr/tmp/ccllvJHW.s: Assembler messages:
/data/data/com.termux/files/usr/tmp/ccllvJHW.s: Warning: end of file in comment; newline inserted
/data/data/com.termux/files/usr/tmp/ccMuIUKa.s: Assembler messages:
/data/data/com.termux/files/usr/tmp/ccMuIUKa.s: Warning: end of file in comment; newline inserted
/data/data/com.termux/files/usr/tmp/ccbDRznd.s: Assembler messages:
/data/data/com.termux/files/usr/tmp/ccbDRznd.s: Warning: end of file in comment; newline inserted
/data/data/com.termux/files/usr/tmp/ccTKnOGI.s: Assembler messages:
/data/data/com.termux/files/usr/tmp/ccTKnOGI.s:15: Error: displacement to undefined symbol .L_div_ge64k_neg_end overflows 12-bit field
/data/data/com.termux/files/usr/tmp/ccTKnOGI.s:32: Error: displacement to undefined symbol .L_div_r8_neg_end overflows 12-bit field
/data/data/com.termux/files/usr/tmp/ccTKnOGI.s: Error: .size expression for ___sdivsi3_i4i does not evaluate to a constant
make[4]: *** [Makefile:491: _div_table_s.o] Error 1
make[4]: Leaving directory '/data/data/com.termux/files/home/sh-elf-gcc/build/sh3eb-elf/m4-nofpu/libgcc'
make[3]: *** [Makefile:1211: multi-do] Error 1
make[3]: Leaving directory '/data/data/com.termux/files/home/sh-elf-gcc/build/sh3eb-elf/libgcc'
make[2]: *** [Makefile:127: all-multi] Error 2
make[2]: Leaving directory '/data/data/com.termux/files/home/sh-elf-gcc/build/sh3eb-elf/libgcc'
make[1]: *** [Makefile:13502: all-target-libgcc] Error 2
make[1]: Leaving directory '/data/data/com.termux/files/home/sh-elf-gcc/build'

└──> le résultat de make -f giteapc.make build

Je sais que le code est un peu long mais je n'arrive pas à cerner ce qui est vraiment inutile de ce qui ne l'est pas.


Si quelqu'un à déjà rencontré cette erreur, je m'en remet à lui.
Lephenixnoir En ligne Administrateur Points: 24225 Défis: 170 Message

Citer : Posté le 22/06/2021 20:37 | #


/data/data/com.termux/files/usr/tmp/ccgeTLTi.s: Error: .size expression for ___movmemSI64 does not evaluate to a constant

Options classiques : le symbole n'est pas défini, la section a changé au moment où la taille est indiquée. Vu le nom de fichier ça a l'air d'être un fichier C compilé. Dans tous les cas j'avoue que je ne sais pas trop d'où ça vient. Si tu peux mettre la main sur le fichier source et/ou retrouver la commande de compilation pour la lancer à la main et inspecter le fichier .s généré, ça aiderait.

/data/data/com.termux/files/usr/tmp/ccXVHe5L.s:12: Error: displacement to undefined symbol .L_div_ge64k_neg_end overflows 12-bit field
/data/data/com.termux/files/usr/tmp/ccXVHe5L.s:29: Error: displacement to undefined symbol .L_div_r8_neg_end overflows 12-bit field
/data/data/com.termux/files/usr/tmp/ccXVHe5L.s: Error: .size expression for ___sdivsi3_i4i does not evaluate to a constant

On dirait que des symboles ne sont pas définis. Si je devais deviner, je dirais que des fonctions/parties de code qui auraient du être compilées ne l'ont pas été à cause d'options pas spécifiées comme il aurait fallu. (?)

/data/data/com.termux/files/home/sh-elf-gcc/build/./gcc/nm: 106: exec: -pg: not found

Il n'a pas trouvé nm, et donc la commande exec $le_nm_trouvé -pg <args> est devenu exec -pg <args> sauf que -pg n'est pas le nom d'un exécutable. Tu peux symlink le nm de binutils dans le dossier sh3eb-elf/bin de la même façon que je symlinke déjà ar, as et ld.
Mon graphe (11 Avril): ((Rogue Life || HH2) ; PythonExtra ; serial gint ; Boson X ; passe gint 3 ; ...) || (shoutbox v5 ; v5)
Milang Hors ligne Membre Points: 488 Défis: 2 Message

Citer : Posté le 02/08/2021 23:11 | #


J'ai constaté que par défaut gcc n'était pas compilé avec le support du fixed point.
Comme il me semblait que celui ci était normalement supporté par l'architecture (je n'ai pas trouvé de doc le confirmant), j'ai donc essayé de compiler gcc avec l'option --enable-fixed-point
Cependant j'ai une erreur à la compilation :
In file included from ../../../../libgcc/fixed-bit.c:55:
../../../../libgcc/fixed-bit.h:64:1: error: unable to emulate 'QQ'
   64 | typedef          _Fract QQtype  __attribute__ ((mode (QQ)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:65:1: error: unable to emulate 'UQQ'
   65 | typedef unsigned _Fract UQQtype __attribute__ ((mode (UQQ)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:66:1: error: unable to emulate 'HQ'
   66 | typedef          _Fract HQtype  __attribute__ ((mode (HQ)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:67:1: error: unable to emulate 'UHQ'
   67 | typedef unsigned _Fract UHQtype __attribute__ ((mode (UHQ)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:68:1: error: unable to emulate 'HA'
   68 | typedef          _Fract HAtype  __attribute__ ((mode (HA)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:69:1: error: unable to emulate 'UHA'
   69 | typedef unsigned _Fract UHAtype __attribute__ ((mode (UHA)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:84:1: error: unable to emulate 'SQ'
   84 | typedef          _Fract SQtype  __attribute__ ((mode (SQ)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:85:1: error: unable to emulate 'USQ'
   85 | typedef unsigned _Fract USQtype __attribute__ ((mode (USQ)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:86:1: error: unable to emulate 'SA'
   86 | typedef          _Fract SAtype  __attribute__ ((mode (SA)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:87:1: error: unable to emulate 'USA'
   87 | typedef unsigned _Fract USAtype __attribute__ ((mode (USA)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:98:1: error: unable to emulate 'DQ'
   98 | typedef          _Fract DQtype  __attribute__ ((mode (DQ)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:99:1: error: unable to emulate 'UDQ'
   99 | typedef unsigned _Fract UDQtype __attribute__ ((mode (UDQ)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:100:1: error: unable to emulate 'DA'
  100 | typedef          _Fract DAtype  __attribute__ ((mode (DA)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:101:1: error: unable to emulate 'UDA'
  101 | typedef unsigned _Fract UDAtype __attribute__ ((mode (UDA)));
      | ^~~~~~~
make[3]: *** [../../../../libgcc/fixed-obj.mk:27 : _addQQ.o] Erreur 1
make[3]: *** Attente des tâches non terminées....
In file included from ../../../../libgcc/fixed-bit.c:55:
../../../../libgcc/fixed-bit.h:64:1: error: unable to emulate 'QQ'
   64 | typedef          _Fract QQtype  __attribute__ ((mode (QQ)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:65:1: error: unable to emulate 'UQQ'
   65 | typedef unsigned _Fract UQQtype __attribute__ ((mode (UQQ)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:66:1: error: unable to emulate 'HQ'
   66 | typedef          _Fract HQtype  __attribute__ ((mode (HQ)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:67:1: error: unable to emulate 'UHQ'
   67 | typedef unsigned _Fract UHQtype __attribute__ ((mode (UHQ)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:68:1: error: unable to emulate 'HA'
   68 | typedef          _Fract HAtype  __attribute__ ((mode (HA)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:69:1: error: unable to emulate 'UHA'
   69 | typedef unsigned _Fract UHAtype __attribute__ ((mode (UHA)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:84:1: error: unable to emulate 'SQ'
   84 | typedef          _Fract SQtype  __attribute__ ((mode (SQ)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:85:1: error: unable to emulate 'USQ'
   85 | typedef unsigned _Fract USQtype __attribute__ ((mode (USQ)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:86:1: error: unable to emulate 'SA'
   86 | typedef          _Fract SAtype  __attribute__ ((mode (SA)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:87:1: error: unable to emulate 'USA'
   87 | typedef unsigned _Fract USAtype __attribute__ ((mode (USA)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:98:1: error: unable to emulate 'DQ'
   98 | typedef          _Fract DQtype  __attribute__ ((mode (DQ)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:99:1: error: unable to emulate 'UDQ'
   99 | typedef unsigned _Fract UDQtype __attribute__ ((mode (UDQ)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:100:1: error: unable to emulate 'DA'
  100 | typedef          _Fract DAtype  __attribute__ ((mode (DA)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:101:1: error: unable to emulate 'UDA'
  101 | typedef unsigned _Fract UDAtype __attribute__ ((mode (UDA)));
      | ^~~~~~~
make[3]: *** [../../../../libgcc/fixed-obj.mk:27 : _addHQ.o] Erreur 1
In file included from ../../../../libgcc/fixed-bit.c:55:
../../../../libgcc/fixed-bit.h:64:1: error: unable to emulate 'QQ'
   64 | typedef          _Fract QQtype  __attribute__ ((mode (QQ)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:65:1: error: unable to emulate 'UQQ'
   65 | typedef unsigned _Fract UQQtype __attribute__ ((mode (UQQ)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:66:1: error: unable to emulate 'HQ'
   66 | typedef          _Fract HQtype  __attribute__ ((mode (HQ)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:67:1: error: unable to emulate 'UHQ'
   67 | typedef unsigned _Fract UHQtype __attribute__ ((mode (UHQ)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:68:1: error: unable to emulate 'HA'
   68 | typedef          _Fract HAtype  __attribute__ ((mode (HA)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:69:1: error: unable to emulate 'UHA'
   69 | typedef unsigned _Fract UHAtype __attribute__ ((mode (UHA)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:84:1: error: unable to emulate 'SQ'
   84 | typedef          _Fract SQtype  __attribute__ ((mode (SQ)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:85:1: error: unable to emulate 'USQ'
   85 | typedef unsigned _Fract USQtype __attribute__ ((mode (USQ)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:86:1: error: unable to emulate 'SA'
   86 | typedef          _Fract SAtype  __attribute__ ((mode (SA)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:87:1: error: unable to emulate 'USA'
   87 | typedef unsigned _Fract USAtype __attribute__ ((mode (USA)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:98:1: error: unable to emulate 'DQ'
   98 | typedef          _Fract DQtype  __attribute__ ((mode (DQ)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:99:1: error: unable to emulate 'UDQ'
   99 | typedef unsigned _Fract UDQtype __attribute__ ((mode (UDQ)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:100:1: error: unable to emulate 'DA'
  100 | typedef          _Fract DAtype  __attribute__ ((mode (DA)));
      | ^~~~~~~
../../../../libgcc/fixed-bit.h:101:1: error: unable to emulate 'UDA'
  101 | typedef unsigned _Fract UDAtype __attribute__ ((mode (UDA)));
      | ^~~~~~~
make[3]: *** [../../../../libgcc/fixed-obj.mk:27 : _addSQ.o] Erreur 1
make[3] : on quitte le répertoire « /home/exodium/dev/c/sh-elf-gcc-casio/src/gcc-11.1.0/gcc-build/sh3eb-elf/m4-nofpu/libgcc »
make[2]: *** [Makefile:1211 : multi-do] Erreur 1
make[2] : on quitte le répertoire « /home/exodium/dev/c/sh-elf-gcc-casio/src/gcc-11.1.0/gcc-build/sh3eb-elf/libgcc »
make[1]: *** [Makefile:127 : all-multi] Erreur 2
make[1] : on quitte le répertoire « /home/exodium/dev/c/sh-elf-gcc-casio/src/gcc-11.1.0/gcc-build/sh3eb-elf/libgcc »
make: *** [Makefile:13502 : all-target-libgcc] Erreur 2


Pour information je compile gcc à partir de https://aur.archlinux.org/packages/sh-elf-gcc-casio en ajoutant l'option correspondante, et les dépendances sont correctement installées (j'ai déja gcc d'installé sans cette option).

Les erreurs laissent suggérer que c'est incompatible avec l'architecture pour laquelle je compile... Est-ce que cela veut dire que l'architecture sh3 ne supporte pas le fixed point (auquel cas j'en coderai un moi même) ou bien ai-je manqué une étape ?

Merci d'avance !
Lephenixnoir En ligne Administrateur Points: 24225 Défis: 170 Message

Citer : Posté le 03/08/2021 08:51 | #


Oui exactement, c'est disponible que sur une ou deux archis à la con.

Si tu veux j'ai codé une version C++ (pas totalement testée, mais essentiellement complète) avec plusieurs formats, ça pourrait servir de base (?)
Mon graphe (11 Avril): ((Rogue Life || HH2) ; PythonExtra ; serial gint ; Boson X ; passe gint 3 ; ...) || (shoutbox v5 ; v5)
Milang Hors ligne Membre Points: 488 Défis: 2 Message

Citer : Posté le 03/08/2021 09:11 | #


J'ai codé un truc à l'arrache donc je suis intéressé
Lephenixnoir En ligne Administrateur Points: 24225 Défis: 170 Message

Citer : Posté le 03/08/2021 09:30 | # | Fichier joint


Je le pousserai plus formellement un autre jour, mais ci-joint (oui y'a qu'un fichier). Tout est suffisamment statique pour que tu puisses initialiser avec des float sans qu'il y ait de conversion au runtime, les constantes sont propagées, etc. Sur ce point-là je pense avoir fait un bon boulot.

Note qu'il faut compiler avec -std=c++17 et il faut la partie basique de lib standard C++ (instructions ici). Promis ça vaut le coup

Pour info j'ai vérifié le code assembleur de toutes les fonctions à la main pour les performances, et c'est inliné. J'ai aussi un fichier de test qui ressemble à ça et montre que les opérations constantes sont bien toutes faites à la compilation.

#include <num/num.h>

using namespace libnum;

static_assert(sizeof(num8) == 1);
static_assert(num8(1).v == 0x00);
static_assert(num8(0.5).v == 0x80);
static_assert(num8(0.0625f).v == 0x10);
static_assert((float)num8(0.25) == 0.25f);
static_assert(num8(0.625) + num8(0.125) == num8(0.75));
static_assert(num8(0.25) < num8(0.75));
static_assert(num8(0.5) >= num8(0.5));

static_assert(sizeof(num16) == 2);
static_assert((uint16_t)num16(-1).v == 0xff00);
static_assert(num16(num8(0.25)).v == num16(0.25).v);

static_assert(sizeof(num32) == 4);
// static_assert(num32(num16(-15)) == num32(-15));

static_assert(sizeof(num64) == 8);
static_assert(num64(num16(1)) == num64(1));
static_assert(num64(num16(-1)) == num64(-1));

static_assert(libnum::is_num_v<num8> == true);
static_assert(libnum::is_num_v<int> == false);

Mon graphe (11 Avril): ((Rogue Life || HH2) ; PythonExtra ; serial gint ; Boson X ; passe gint 3 ; ...) || (shoutbox v5 ; v5)
Milang Hors ligne Membre Points: 488 Défis: 2 Message

Citer : Posté le 04/08/2021 16:36 | #


J'ai un problème lorsqu'il faut créer les liens symboliques pour OpenLibm : Il est marquer qu'il faut créer les liens vers un dossier sys-include mais je n'ai pas trouvé ce dossier ni dans les dossiers de build ni dans ce que j'ai installé... Faut il que je crée cd dossier moi même, et dans ce cas où ?
Lephenixnoir En ligne Administrateur Points: 24225 Défis: 170 Message

Citer : Posté le 04/08/2021 17:04 | #


Oui il faut le créer. Ça doit te donner ça :

$PREFIX/sh-elf-gcc % ll sh3eb-elf
Permissions Size User Date Modified Name
drwxr-xr-x     - el   30 May 14:15  bin
lrwxrwxrwx    86 el   30 May 14:52  include -> $PREFIX/sh-elf-gcc/lib/gcc/sh3eb-elf/11.1.0/include
lrwxrwxrwx    79 el   30 May 14:52  lib -> $PREFIX/sh-elf-gcc/lib/gcc/sh3eb-elf/11.1.0
drwxr-xr-x     - el   13 Jun 18:20  sys-include

Dans sh3eb-elf/bin tu dois avoir les 4 liens symboliques vers des programmes de binutils. Si c'est bien ça alors tu es dans le bon dossier, tu peux créer sans te poser de questions. C'est dans les sources, pas dans le dossier de build.
Mon graphe (11 Avril): ((Rogue Life || HH2) ; PythonExtra ; serial gint ; Boson X ; passe gint 3 ; ...) || (shoutbox v5 ; v5)
Milang Hors ligne Membre Points: 488 Défis: 2 Message

Citer : Posté le 04/08/2021 20:54 | #


C'est normal que pour moi lib soit un dossier et je n'ai pas le lien symbolique pour include ?
Lephenixnoir En ligne Administrateur Points: 24225 Défis: 170 Message

Citer : Posté le 04/08/2021 21:51 | #


Hmm te pose pas trop de questions c'est possible que ce soit des restes de mes tentatives. Si tu as des erreurs rapporte-les moi je pourrai te dire si c'est lié. Malheureusement mes notes n'expliquent pas ce que ça fait là (et je ne m'en souviens plus, c'est trop vieux) donc il faudra improviser un peu.
Mon graphe (11 Avril): ((Rogue Life || HH2) ; PythonExtra ; serial gint ; Boson X ; passe gint 3 ; ...) || (shoutbox v5 ; v5)
Milang Hors ligne Membre Points: 488 Défis: 2 Message

Citer : Posté le 04/08/2021 22:00 | #


J'ai une erreur au moment de la comilation de la libstdc++ :
L'erreur a lieu pour la commande make all-target-libstdc++-v3
checking stdalign.h usability... no
checking stdalign.h presence... yes
configure: WARNING: stdalign.h: present but cannot be compiled
configure: WARNING: stdalign.h:     check for missing prerequisite headers?
configure: WARNING: stdalign.h: see the Autoconf documentation
configure: WARNING: stdalign.h:     section "Present But Cannot Be Compiled"
configure: WARNING: stdalign.h: proceeding with the compiler's result
checking for stdalign.h... no
checking for the value of EOF... configure: error: computing EOF failed
make: *** [Makefile:12073 : configure-target-libstdc++-v3] Erreur 1


J'ai également le même problème pour stdbool un peu plus tot dans le log.
Lephenixnoir En ligne Administrateur Points: 24225 Défis: 170 Message

Citer : Posté le 04/08/2021 22:05 | #


Tu as la fxlibc installée et disponible ? Si oui c'est probablement exactement à ça que les lib et include servent. Dis-moi ce que tu as dans lib pour voir si on peut remplacer par un symlink ?
Mon graphe (11 Avril): ((Rogue Life || HH2) ; PythonExtra ; serial gint ; Boson X ; passe gint 3 ; ...) || (shoutbox v5 ; v5)
Milang Hors ligne Membre Points: 488 Défis: 2 Message

Citer : Posté le 04/08/2021 22:10 | #


~/opt/sh-elf-toolchain  ls -R sh3eb-elf/lib                                               ok
sh3eb-elf/lib:
ldscripts

sh3eb-elf/lib/ldscripts:
shelf.x    shelf.xr    shelf.xswe  shlelf.xc   shlelf.xsc   shlelf.xw   shl.xr  sh.xr
shelf.xbn  shelf.xs    shelf.xu    shlelf.xce  shlelf.xsce  shlelf.xwe  shl.xu  sh.xu
shelf.xc   shelf.xsc   shelf.xw    shlelf.xe   shlelf.xse   shl.x       sh.x
shelf.xce  shelf.xsce  shelf.xwe   shlelf.xn   shlelf.xsw   shl.xbn     sh.xbn
shelf.xe   shelf.xse   shlelf.x    shlelf.xr   shlelf.xswe  shl.xe      sh.xe
shelf.xn   shelf.xsw   shlelf.xbn  shlelf.xs   shlelf.xu    shl.xn      sh.xn


Je vais tenter de réinstaller fxlibc pour voir
Lephenixnoir En ligne Administrateur Points: 24225 Défis: 170 Message

Citer : Posté le 04/08/2021 22:17 | #


Mouais tu peux virer ce lib et mettre le symlink à la place je pense.
Mon graphe (11 Avril): ((Rogue Life || HH2) ; PythonExtra ; serial gint ; Boson X ; passe gint 3 ; ...) || (shoutbox v5 ; v5)
Milang Hors ligne Membre Points: 488 Défis: 2 Message

Citer : Posté le 04/08/2021 23:54 | #


J'ai essayé avec le symlink mais j'ai obtenu la même erreur

En essayant de reinstaller fxlibc j'ai cependant trouvé quelque chose de bizarre dans la structure de mon installation :

Tout se fait dans $PREFIX :
J'ai les dossiers suivants manuellement créés pour la compilation :
binutils-${ver}/  (sources)
gcc-${ver}/ (sources)
build-gcc
build-binutils
OpenLibm
fxlibc

je compile-installe ensuite gcc et binutils avec comme préfixe PREFIX puis openlibm et fxlibc avec PREFIX=$(sh-elf-gcc --print-search-dirs | grep install | sed 's/install: //') comme demandé

Cependant j'ai l'impression d'installer à deux emplacements différents :
le $PREFIX initial ressemble maintenant à ça:
drwxr-xr-x 2 exodium exodium 4096 04.08.2021 23:21 bin/
drwxr-xr-x 19 exodium exodium 4096 04.08.2021 22:26 binutils-2.37/
drwxr-xr-x 13 exodium exodium 4096 04.08.2021 22:29 build-binutils/
drwxr-xr-x 14 exodium exodium 4096 04.08.2021 23:21 build-gcc/
drwxr-xr-x 8 exodium exodium 4096 04.08.2021 23:22 fxlibc/
drwxr-xr-x 38 exodium exodium 4096 27.04.2021 12:19 gcc-11.1.0/
drwxr-xr-x 2 exodium exodium 4096 04.08.2021 23:20 include/
drwxr-xr-x 4 exodium exodium 4096 04.08.2021 23:20 lib/
drwxr-xr-x 3 exodium exodium 4096 04.08.2021 23:20 libexec/
drwxr-xr-x 20 exodium exodium 4096 04.08.2021 23:22 OpenLibm/
drwxr-xr-x 3 exodium exodium 4096 04.08.2021 23:36 sh3eb-elf/
drwxr-xr-x 4 exodium exodium 4096 04.08.2021 22:32 share/
drwxr-xr-x 2 exodium exodium 4096 04.08.2021 23:22 sys-include/
-rw-r--r-- 1 exodium exodium 22916924 04.08.2021 22:26 binutils-2.37.tar.xz
-rw-r--r-- 1 exodium exodium 78877216 04.08.2021 22:26 gcc-11.1.0.tar.xz


Ce qui me surprend est que le dossier sh3eb-elf contient lui aussi les dossiers bin (vide) et lib (dont j'ai montré le contenu précedemment) comme si quelque chose a été installé ici au lieu du niveau supérieur (j'espère être clair)

Ajouté le 04/08/2021 à 23:58 :
Je viens de voir que je n'aurais peut être pas dû compiler dans le même dossier que $PREFIX je vais essayer de rendre les choses plus propres
Lephenixnoir En ligne Administrateur Points: 24225 Défis: 170 Message

Citer : Posté le 05/08/2021 08:14 | #


Ah mais je suis désolé, c'était pas clair cette histoire.

Le système est différent maintenant, tu dois vraiment utiliser les dépôts sh-elf-binutils et sh-elf-gcc. Il y a des scripts dedans qui compilent à ta place et tu n'as besoin d'intervenir qu'après pour compiler libstdc++. Tu ne peux pas utiliser la même structure qu'avant !
Mon graphe (11 Avril): ((Rogue Life || HH2) ; PythonExtra ; serial gint ; Boson X ; passe gint 3 ; ...) || (shoutbox v5 ; v5)
Milang Hors ligne Membre Points: 488 Défis: 2 Message

Citer : Posté le 05/08/2021 12:42 | #


Je dois donc installer sh-elf-binutils puis sh-elf-gcc avec les scripts fournis puis recompiler gcc dans un autre dossier et installer par dessus avec les instructions c'est bien ça ?
Lephenixnoir En ligne Administrateur Points: 24225 Défis: 170 Message

Citer : Posté le 05/08/2021 13:28 | #


Tu installes binutils avec les scripts, et pour GCC :

First configure GCC as usual (follow configure.sh), but use a separate build folder.

À la main donc, mais tu peux copier/coller le script pour à peu près toutes les commandes qui ne sont pas données explicitement dans le README
Mon graphe (11 Avril): ((Rogue Life || HH2) ; PythonExtra ; serial gint ; Boson X ; passe gint 3 ; ...) || (shoutbox v5 ; v5)
Précédente 1, 2, 3 ··· 10 ··· 20, 21, 22, 23, 24, 25 Suivante

LienAjouter une imageAjouter une vidéoAjouter un lien vers un profilAjouter du codeCiterAjouter un spoiler(texte affichable/masquable par un clic)Ajouter une barre de progressionItaliqueGrasSoulignéAfficher du texte barréCentréJustifiéPlus petitPlus grandPlus de smileys !
Cliquez pour épingler Cliquez pour détacher Cliquez pour fermer
Alignement de l'image: Redimensionnement de l'image (en pixel):
Afficher la liste des membres
:bow: :cool: :good: :love: ^^
:omg: :fusil: :aie: :argh: :mdr:
:boulet2: :thx: :champ: :whistle: :bounce:
valider
 :)  ;)  :D  :p
 :lol:  8)  :(  :@
 0_0  :oops:  :grr:  :E
 :O  :sry:  :mmm:  :waza:
 :'(  :here:  ^^  >:)

Σ π θ ± α β γ δ Δ σ λ
Veuillez donner la réponse en chiffre
Vous devez activer le Javascript dans votre navigateur pour pouvoir valider ce formulaire.

Si vous n'avez pas volontairement désactivé cette fonctionnalité de votre navigateur, il s'agit probablement d'un bug : contactez l'équipe de Planète Casio.

Planète Casio v4.3 © créé par Neuronix et Muelsaco 2004 - 2024 | Il y a 55 connectés | Nous contacter | Qui sommes-nous ? | Licences et remerciements

Planète Casio est un site communautaire non affilié à Casio. Toute reproduction de Planète Casio, même partielle, est interdite.
Les programmes et autres publications présentes sur Planète Casio restent la propriété de leurs auteurs et peuvent être soumis à des licences ou copyrights.
CASIO est une marque déposée par CASIO Computer Co., Ltd