add scripts to provide c89 and c99 compilers

This commit is contained in:
Ilfat G 2022-04-21 13:29:29 +03:00
parent 21a06366b9
commit fdec635442
No known key found for this signature in database
GPG key ID: D5E884CA11E29755
3 changed files with 28 additions and 0 deletions

11
c89 Normal file
View file

@ -0,0 +1,11 @@
#!/bin/sh
fl="-std=c89"
for opt; do
case "$opt" in
-ansi|-std=c89|-std=iso9899:1990) fl="";;
-std=*) echo "`basename $0` called with non ANSI/ISO C option $opt" >&2
exit 1;;
esac
done
exec gcc $fl ${1+"$@"}

11
c99 Normal file
View file

@ -0,0 +1,11 @@
#!/bin/sh
fl="-std=c99"
for opt; do
case "$opt" in
-std=c99|-std=iso9899:1999) fl="";;
-std=*) echo "`basename $0` called with non ISO C99 option $opt" >&2
exit 1;;
esac
done
exec gcc $fl ${1+"$@"}

View file

@ -22,6 +22,8 @@ License: GPLv2+
Group: System/Base
Source0: lcc_%{version}-vd6u2_e2k-8c.deb
Source1: lcc-libs_%{version}-vd6u42_e2k-8c.deb
Source2: c89
Source3: c99
Source100: lcc.rpmlintrc
Provides: gcc
Provides: gcc(e2k-64)
@ -418,6 +420,8 @@ rm -fv data.tar.* control.tar*
%install
cp -frax opt usr var %{buildroot}
install -m755 %{SOURCE2} %{buildroot}%{_bindir}
install -m755 %{SOURCE3} %{buildroot}%{_bindir}
%if %{without bundled_libs}
rm -fv %{buildroot}/%{_libdir}/libstdc*
@ -476,6 +480,8 @@ cp -fvr opt/mcst/lcc-home/%{version}/e2k-v4-linux/include/c++/ %{buildroot}/%{_i
%{_bindir}/cpp
%{_bindir}/g++
%{_bindir}/gcc
%{_bindir}/c89
%{_bindir}/c99
%{_bindir}/gfortran
/opt/mcst/lcc-home/%{version}/e2k-v4-linux/bin/*