#136 gcc (add c99 script)
Closed: Rejected 7 months ago by lkocman. Opened 7 months ago by lindblad.

I suggest adding to the gcc package a c99 executable script.

https://mirrors.slackware.com/slackware/slackware64-current/source/d/gcc/

c99.sh

That .sh file appears on the system when installed without the file extension.


https://st.suckless.org/

st is a simple terminal implementation for X

Absent a c99 file one has to use CC=gcc before make when building st.


What is the failure mode when omitting CC=gcc? That is, what is fixed by adding a 'c99' script/executable? What standards mandate such a binary?

Note there is already 'cc' which defaults to whatever gcc defaults to,
for Leap15+ it is C11, for Factory it should be C17.

Metadata Update from @lkocman:
- Issue set to the milestone: 15.6

7 months ago

@Pharaoh_Atem mentioned that Fedora actually has /usr/bin/c89 && /usr/bin/c99

It looks like this is a thing that's just kind of always existed in Fedora's gcc: https://src.fedoraproject.org/rpms/gcc/c/fea77518a0bf2dc112cdb565d92fd5d64d3444b9

I'm not necessarily in favor of introducing this quirk into openSUSE GCC, but that's up to the maintainers.

I would suggest getting the st upstream folks to fix their Makefile though. The options for various C standards in compilers have long since been standardized themselves.

I'll note that 'man c99' indicates that GCCs driver doesn't conform to the
required argument processing. Neither -O <optlevel> is handled, nor -s
and the slackware provided script does not implement that compatibility correctly AFAICS.

I don't see how 'st' Makefile is helped by providing a c99 binary, GNU make will set CC to cc by default and that should already work correctly? To use c99 you'd have to set CC=c99 before compiling...

this was more reporting than a feature request

I'm not inclined to comment on the code quality of the c99 script. @Pharaoh_Atem provided a Fedora link and in gcc41.spec appears a heredoc which is identical in content to the "slackware provided script".

I would agree it's up to the maintainers if anything is to be done about this.

I'm fine just closing the Issue.

@rguenther

when omitting CC=gcc

Here's the output without and with the c99 file.

bash-4.4$ ls ~/bin
bash-4.4$ tar xf st-0.9.tar.gz && cd st-0.9
bash-4.4$ make
st build options:
CFLAGS  = -I/usr/X11R6/include  -I/usr/include/uuid -I/usr/include/freetype2  -I/usr/include/freetype2 -DVERSION="0.9" -D_XOPEN_SOURCE=600  -O
LDFLAGS = -L/usr/X11R6/lib -lm -lrt -lX11 -lutil -lXft  -lfontconfig -lfreetype  -lfreetype
CC      = c99
cp config.def.h config.h
c99 -I/usr/X11R6/include  `pkg-config --cflags fontconfig`  `pkg-config --cflags freetype2` -DVERSION=\"0.9\" -D_XOPEN_SOURCE=600  -O -c st.c
/bin/sh: c99: command not found
make: *** [Makefile:22: st.o] Error 127
bash-4.4$ cp ~/Downloads/c99 ~/bin
bash-4.4$ make
st build options:
CFLAGS  = -I/usr/X11R6/include  -I/usr/include/uuid -I/usr/include/freetype2  -I/usr/include/freetype2 -DVERSION="0.9" -D_XOPEN_SOURCE=600  -O
LDFLAGS = -L/usr/X11R6/lib -lm -lrt -lX11 -lutil -lXft  -lfontconfig -lfreetype  -lfreetype
CC      = c99
c99 -I/usr/X11R6/include  `pkg-config --cflags fontconfig`  `pkg-config --cflags freetype2` -DVERSION=\"0.9\" -D_XOPEN_SOURCE=600  -O -c st.c
c99 -I/usr/X11R6/include  `pkg-config --cflags fontconfig`  `pkg-config --cflags freetype2` -DVERSION=\"0.9\" -D_XOPEN_SOURCE=600  -O -c x.c
c99 -o st st.o x.o -L/usr/X11R6/lib -lm -lrt -lX11 -lutil -lXft  `pkg-config --libs fontconfig`  `pkg-config --libs freetype2`
bash-4.4$ 

Hello, closing the issue based on the last comment. Feel free to re-open it if needed.

Thank you!

Metadata Update from @lkocman:
- Issue close_status updated to: Rejected
- Issue status updated to: Closed (was: Open)

7 months ago

Login to comment on this ticket.

Metadata