Ticket #242 (closed defect: fixed)

Opened 8 years ago

Last modified 8 years ago

replace cc with gcc

Reported by: Larry Baker Owned by: somebody
Priority: minor Milestone: All Platforms
Component: ALL modules Version: 7.7
Keywords: Cc:

Description

Where possible replace cc with gcc. May not always be possible in included packages.

Larry's mail:


Did the make unix. Now looking at the make.log file.

I found a bunch of "cc" commands, instead of "gcc" commands. (No "c++"s or "f77"s or "g77"s.) On CentOS at least, cc is a soft link to gcc, so it happens to work. The expectation on Linux is that CC= overrides the default C compiler in make, CXX= overrides the default C++ compiler, and FC= overrides the default Fortran compiler. Whether the user overrides it or not, there should only be one C compiler used, normally specified as $(CC) in the Makefiles. (That is what is defined in the default make rules.) I think Paul already knows the Makefiles need help.

Larry Baker US Geological Survey 650-329-5608 baker@… <mailto:baker@…>

[root@atompc earthworm]# grep -w cc earthworm-7.6-5266/make.log cc -c -Dfortran_suffix -Dqlib2_fortran -m32 -O drm_utils.c ms_utils.c ms_pack.c ms_pack2.c ms_unpack.c pack.c qda_utils.c qtime.c sdr_utils.c unpack.c qutils.c cc -c -Dfortran_suffix -Dqlib2_fortran -m32 -g drm_utils.c ms_utils.c ms_pack.c ms_pack2.c ms_unpack.c pack.c qda_utils.c qtime.c sdr_utils.c unpack.c qutils.c cc -c -Dfortran_suffix -Dqlib2_fortran -m32 -DNO_LEAPSECONDS -O drm_utils.c ms_utils.c ms_pack.c ms_pack2.c ms_unpack.c pack.c qda_utils.c qtime.c sdr_utils.c unpack.c qutils.c cc -c -Dfortran_suffix -Dqlib2_fortran -m32 -DNO_LEAPSECONDS -g drm_utils.c ms_utils.c ms_pack.c ms_pack2.c ms_unpack.c pack.c qda_utils.c qtime.c sdr_utils.c unpack.c qutils.c cc -o /opt/earthworm/earthworm-7.6-5266/bin/nq2wws nq2wws.o /opt/earthworm/earthworm-7.6-5266/lib/mem_circ_queue.o /opt/earthworm/earthworm-7.6-5266/lib/chron3.o /opt/earthworm/earthworm-7.6-5266/lib/kom.o /opt/earthworm/earthworm-7.6-5266/lib/getsysname_ew.o /opt/earthworm/earthworm-7.6-5266/lib/getutil.o /opt/earthworm/earthworm-7.6-5266/lib/logit_mt.o /opt/earthworm/earthworm-7.6-5266/lib/transport.o /opt/earthworm/earthworm-7.6-5266/lib/sleep_ew.o /opt/earthworm/earthworm-7.6-5266/lib/socket_ew.o /opt/earthworm/earthworm-7.6-5266/lib/socket_ew_common.o /opt/earthworm/earthworm-7.6-5266/lib/dirops_ew.o /opt/earthworm/earthworm-7.6-5266/lib/time_ew.o /opt/earthworm/earthworm-7.6-5266/lib/threads_ew.o /opt/earthworm/earthworm-7.6-5266/lib/sema_ew.o /opt/earthworm/earthworm-7.6-5266/lib/swap.o -L/opt/earthworm/earthworm-7.6-5266/src/libsrc/qlib2/ -lqlib2nl -D_REENTRANT -m32 -Dlinux -Di386 -D_LINUX -D_INTEL -D_USE_SCHED

-D_USE_PTHREADS -D_USE_TERMIOS

-I/opt/earthworm/earthworm-7.6-5266/include -g -I/opt/earthworm/earthworm-7.6-5266/src/libsrc/qlib2/ -lm -pthread cc -o /opt/earthworm/earthworm-7.6-5266/bin/nq2wws nq2wws.o /opt/earthworm/earthworm-7.6-5266/lib/mem_circ_queue.o /opt/earthworm/earthworm-7.6-5266/lib/chron3.o /opt/earthworm/earthworm-7.6-5266/lib/kom.o /opt/earthworm/earthworm-7.6-5266/lib/getsysname_ew.o /opt/earthworm/earthworm-7.6-5266/lib/getutil.o /opt/earthworm/earthworm-7.6-5266/lib/logit_mt.o /opt/earthworm/earthworm-7.6-5266/lib/transport.o /opt/earthworm/earthworm-7.6-5266/lib/sleep_ew.o /opt/earthworm/earthworm-7.6-5266/lib/socket_ew.o /opt/earthworm/earthworm-7.6-5266/lib/socket_ew_common.o /opt/earthworm/earthworm-7.6-5266/lib/dirops_ew.o /opt/earthworm/earthworm-7.6-5266/lib/time_ew.o /opt/earthworm/earthworm-7.6-5266/lib/threads_ew.o /opt/earthworm/earthworm-7.6-5266/lib/sema_ew.o /opt/earthworm/earthworm-7.6-5266/lib/swap.o -L/opt/earthworm/earthworm-7.6-5266/src/libsrc/qlib2/ -lqlib2nl -D_REENTRANT -m32 -Dlinux -Di386 -D_LINUX -D_INTEL -D_USE_SCHED

-D_USE_PTHREADS -D_USE_TERMIOS

-I/opt/earthworm/earthworm-7.6-5266/include -g -I/opt/earthworm/earthworm-7.6-5266/src/libsrc/qlib2/ -lm -pthread cc -m32 -Dlinux -Di386 -D_LINUX -D_INTEL -D_USE_SCHED

-D_USE_PTHREADS -D_USE_TERMIOS

-I/opt/earthworm/earthworm-7.6-5266/include -o /opt/earthworm/earthworm-7.6-5266/bin/coda_aav coda_aav.o caav_config.o caav_stalist.o compare.o /opt/earthworm/earthworm-7.6-5266/lib/kom.o /opt/earthworm/earthworm-7.6-5266/lib/getutil.o /opt/earthworm/earthworm-7.6-5266/lib/time_ew.o /opt/earthworm/earthworm-7.6-5266/lib/chron3.o /opt/earthworm/earthworm-7.6-5266/lib/logit.o /opt/earthworm/earthworm-7.6-5266/lib/transport.o /opt/earthworm/earthworm-7.6-5266/lib/sleep_ew.o /opt/earthworm/earthworm-7.6-5266/lib/swap.o /opt/earthworm/earthworm-7.6-5266/lib/trheadconv.o /opt/earthworm/earthworm-7.6-5266/lib/rw_coda_aav.o -lm -pthread cc -m32 -Dlinux -Di386 -D_LINUX -D_INTEL -D_USE_SCHED

-D_USE_PTHREADS -D_USE_TERMIOS

-I/opt/earthworm/earthworm-7.6-5266/include -o /opt/earthworm/earthworm-7.6-5266/bin/coda_dur coda_dur.o cdur_config.o cdur_stalist.o compare.o /opt/earthworm/earthworm-7.6-5266/lib/kom.o /opt/earthworm/earthworm-7.6-5266/lib/getutil.o /opt/earthworm/earthworm-7.6-5266/lib/time_ew.o /opt/earthworm/earthworm-7.6-5266/lib/chron3.o /opt/earthworm/earthworm-7.6-5266/lib/logit.o /opt/earthworm/earthworm-7.6-5266/lib/transport.o /opt/earthworm/earthworm-7.6-5266/lib/sleep_ew.o /opt/earthworm/earthworm-7.6-5266/lib/rdpickcoda.o /opt/earthworm/earthworm-7.6-5266/lib/rw_coda_aav.o -lm -pthread checking whether /usr/bin/gcc and cc understand -c and -o together... yes cc -c -g -m32 -Dlinux -Di386 -D_LINUX -D_INTEL -D_USE_SCHED

-D_USE_PTHREADS -D_USE_TERMIOS

-I/opt/earthworm/earthworm-7.6-5266/include -DDEBUG k2ewmain.c cc -c -g -m32 -Dlinux -Di386 -D_LINUX -D_INTEL -D_USE_SCHED

-D_USE_PTHREADS -D_USE_TERMIOS

-I/opt/earthworm/earthworm-7.6-5266/include -DDEBUG outptthrd.c cc -c -g -m32 -Dlinux -Di386 -D_LINUX -D_INTEL -D_USE_SCHED

-D_USE_PTHREADS -D_USE_TERMIOS

-I/opt/earthworm/earthworm-7.6-5266/include -DDEBUG terminat.c cc -c -g -m32 -Dlinux -Di386 -D_LINUX -D_INTEL -D_USE_SCHED

-D_USE_PTHREADS -D_USE_TERMIOS

-I/opt/earthworm/earthworm-7.6-5266/include -DDEBUG getconfig.c cc -c -g -m32 -Dlinux -Di386 -D_LINUX -D_INTEL -D_USE_SCHED

-D_USE_PTHREADS -D_USE_TERMIOS

-I/opt/earthworm/earthworm-7.6-5266/include -DDEBUG k2ewerrs.c cc -c -g -m32 -Dlinux -Di386 -D_LINUX -D_INTEL -D_USE_SCHED

-D_USE_PTHREADS -D_USE_TERMIOS

-I/opt/earthworm/earthworm-7.6-5266/include -DDEBUG k2crctbl.c cc -c -g -m32 -Dlinux -Di386 -D_LINUX -D_INTEL -D_USE_SCHED

-D_USE_PTHREADS -D_USE_TERMIOS

-I/opt/earthworm/earthworm-7.6-5266/include -DDEBUG k2cirbuf.c cc -c -g -m32 -Dlinux -Di386 -D_LINUX -D_INTEL -D_USE_SCHED

-D_USE_PTHREADS -D_USE_TERMIOS

-I/opt/earthworm/earthworm-7.6-5266/include -DDEBUG k2pktman.c cc -c -g -m32 -Dlinux -Di386 -D_LINUX -D_INTEL -D_USE_SCHED

-D_USE_PTHREADS -D_USE_TERMIOS

-I/opt/earthworm/earthworm-7.6-5266/include -DDEBUG k2misc.c cc -c -g -m32 -Dlinux -Di386 -D_LINUX -D_INTEL -D_USE_SCHED

-D_USE_PTHREADS -D_USE_TERMIOS

-I/opt/earthworm/earthworm-7.6-5266/include -DDEBUG k2pktio.c cc -c -g -m32 -Dlinux -Di386 -D_LINUX -D_INTEL -D_USE_SCHED

-D_USE_PTHREADS -D_USE_TERMIOS

-I/opt/earthworm/earthworm-7.6-5266/include -DDEBUG k2ewrstrt.c cc -c -g -m32 -Dlinux -Di386 -D_LINUX -D_INTEL -D_USE_SCHED

-D_USE_PTHREADS -D_USE_TERMIOS

-I/opt/earthworm/earthworm-7.6-5266/include -DDEBUG heartbt.c cc -c -g -m32 -Dlinux -Di386 -D_LINUX -D_INTEL -D_USE_SCHED

-D_USE_PTHREADS -D_USE_TERMIOS

-I/opt/earthworm/earthworm-7.6-5266/include -DDEBUG k2info.c cc -c -g -m32 -Dlinux -Di386 -D_LINUX -D_INTEL -D_USE_SCHED

-D_USE_PTHREADS -D_USE_TERMIOS

-I/opt/earthworm/earthworm-7.6-5266/include -DDEBUG error_ew_un.c cc -c -g -m32 -Dlinux -Di386 -D_LINUX -D_INTEL -D_USE_SCHED

-D_USE_PTHREADS -D_USE_TERMIOS

-I/opt/earthworm/earthworm-7.6-5266/include -DDEBUG k2c_tcp.c cc -g -m32 -Dlinux -Di386 -D_LINUX -D_INTEL -D_USE_SCHED

-D_USE_PTHREADS -D_USE_TERMIOS

-I/opt/earthworm/earthworm-7.6-5266/include -DDEBUG -o /opt/earthworm/earthworm-7.6-5266/bin/k2ew_tcp k2ewmain.o outptthrd.o terminat.o getconfig.o k2ewerrs.o k2crctbl.o k2cirbuf.o k2pktman.o k2misc.o k2pktio.o k2ewrstrt.o heartbt.o k2info.o error_ew_un.o k2c_tcp.o /opt/earthworm/earthworm-7.6-5266/lib/logit_mt.o /opt/earthworm/earthworm-7.6-5266/lib/kom.o /opt/earthworm/earthworm-7.6-5266/lib/getutil.o /opt/earthworm/earthworm-7.6-5266/lib/sleep_ew.o /opt/earthworm/earthworm-7.6-5266/lib/time_ew.o /opt/earthworm/earthworm-7.6-5266/lib/transport.o /opt/earthworm/earthworm-7.6-5266/lib/sema_ew.o /opt/earthworm/earthworm-7.6-5266/lib/threads_ew.o \ cc -c -g -m32 -Dlinux -Di386 -D_LINUX -D_INTEL -D_USE_SCHED

-D_USE_PTHREADS -D_USE_TERMIOS

-I/opt/earthworm/earthworm-7.6-5266/include -DDEBUG k2c_ser_un.c cc -g -m32 -Dlinux -Di386 -D_LINUX -D_INTEL -D_USE_SCHED

-D_USE_PTHREADS -D_USE_TERMIOS

-I/opt/earthworm/earthworm-7.6-5266/include -DDEBUG -o /opt/earthworm/earthworm-7.6-5266/bin/k2ew_tty k2ewmain.o outptthrd.o terminat.o getconfig.o k2ewerrs.o k2crctbl.o k2cirbuf.o k2pktman.o k2misc.o k2pktio.o k2ewrstrt.o heartbt.o k2info.o error_ew_un.o k2c_ser_un.o /opt/earthworm/earthworm-7.6-5266/lib/logit_mt.o /opt/earthworm/earthworm-7.6-5266/lib/kom.o /opt/earthworm/earthworm-7.6-5266/lib/getutil.o /opt/earthworm/earthworm-7.6-5266/lib/sleep_ew.o /opt/earthworm/earthworm-7.6-5266/lib/time_ew.o /opt/earthworm/earthworm-7.6-5266/lib/transport.o /opt/earthworm/earthworm-7.6-5266/lib/sema_ew.o /opt/earthworm/earthworm-7.6-5266/lib/threads_ew.o -lm -lpthread

[root@atompc earthworm]# which cc /usr/bin/cc [root@atompc earthworm]# ls -l which cc lrwxrwxrwx. 1 root root 3 Sep 6 14:45 /usr/bin/cc -> gcc

Change History

comment:1 Changed 8 years ago by tim

  • Status changed from new to closed
  • Resolution set to fixed

All files are changed and checked in. All reference to cc or gcc have been replaced with $(cc)

[tim@ew src]$ svn ci
Sending        archiving/Makefile
Sending        archiving/archman/makefile.sol
Sending        archiving/cont_trig/makefile.sol
Sending        archiving/ew2mseed/makefile.cyg
Sending        archiving/ew2mseed/makefile_export.sol
Sending        archiving/menlo_report/makefile.sol
Sending        archiving/nq2wws/makefile.sol
Sending        archiving/nq2wws/makefile.ux
Sending        archiving/nq2wws_ack/makefile.sol
Sending        archiving/tankplayer/makefile.sol
Sending        archiving/tankplayer_tools/makefile.sol
Sending        archiving/trig2disk/makefile.sol
Sending        archiving/wave_serverV/makefile.sol
Sending        archiving/waveman2disk/makefile.sol
Sending        archiving/ws2matlab/makefile.sol
Sending        data_exchange/coaxtoring/makefile.sol
Sending        data_exchange/condenselogo/makefile.sol
Sending        data_exchange/ew2file/makefile.sol
Sending        data_exchange/export/makefile.sol
Sending        data_exchange/file2ew/makefile.sol
Sending        data_exchange/getfileII/makefile.bsd
Sending        data_exchange/getfileII/makefile.lnx
Sending        data_exchange/getfileII/makefile.sol
Sending        data_exchange/getfile_client/makefile.bsd
Sending        data_exchange/getfile_client/makefile.lnx
Sending        data_exchange/getfile_client/makefile.sol
Sending        data_exchange/getfile_ew/makefile.sol
Sending        data_exchange/import_generic/makefile.sol
Sending        data_exchange/import_pasv/makefile.sol
Sending        data_exchange/liss/makefile.lnx
Sending        data_exchange/liss/makefile.sol
Sending        data_exchange/makehbfile/makefile.sol
Sending        data_exchange/pickwasher/makefile.sol
Sending        data_exchange/ringdup/makefile.sol
Sending        data_exchange/ringtocoax/makefile.sol
Sending        data_exchange/scn_convert/makefile.sol
Sending        data_exchange/seisan_report/makefile.sol
Sending        data_exchange/seisan_report/makefile.ux
Sending        data_exchange/sendfile_srv/makefile.bsd
Sending        data_exchange/sendfile_srv/makefile.lnx
Sending        data_exchange/sendfile_srv/makefile.sol
Sending        data_exchange/sendfilemt/makefile.sol
Sending        data_sources/gcf2ew/makefile.sol
Sending        data_sources/gcf2ew/makefile.ux
Sending        data_sources/grf2ew/makefile.sol
Sending        data_sources/k2ew/makefile.sol
Sending        data_sources/k2ew/makefile.sol.debug
Sending        data_sources/k2ew/makefile.sol.local
Sending        data_sources/k2ew/makefile.ux
Sending        data_sources/naqs2ew/makefile.sol
Sending        data_sources/nq2ring/makefile.sol
Sending        data_sources/nq2ring/makefile.ux
Sending        data_sources/q2ew/makefile.sol
Sending        data_sources/q2ew/makefile.ux
Sending        data_sources/reboot_mss/makefile.sol
Sending        data_sources/reboot_mss/makefile.ux
Sending        data_sources/reboot_mss_ew/makefile.sol
Sending        data_sources/reboot_mss_ew/makefile.ux
Sending        data_sources/reftek2ew/makefile.sol
Sending        data_sources/samtac2ew/makefile.ux
Sending        diagnostic_tools/config_ws/makefile.ux
Sending        diagnostic_tools/dumpwave/makefile.sol
Sending        diagnostic_tools/file2ring/makefile.sol
Sending        diagnostic_tools/findwave/makefile.sol
Sending        diagnostic_tools/gaplist/makefile.sol
Sending        diagnostic_tools/getmenu/makefile.sol
Sending        diagnostic_tools/getstation/makefile.sol
Sending        diagnostic_tools/putpick/makefile.sol
Sending        diagnostic_tools/ringVtanks/makefile.sol
Sending        diagnostic_tools/sniffring/makefile.sol
Sending        diagnostic_tools/sniffrings/makefile.sol
Sending        diagnostic_tools/sniffwave/makefile.sol
Sending        diagnostic_tools/template/makefile.sol
Sending        diagnostic_tools/wsv_test/makefile.sol
Sending        display/ew2seisvole/makefile.sol
Sending        display/heli_ewII/makefile.sol
Sending        display/heli_ewII/makefile.ux
Sending        display/sgram/makefile.sol
Sending        grab_bag/arc2trig/makefile.sol
Sending        grab_bag/comment2html/makefile.nt
Sending        grab_bag/comment2html/makefile.sol
Sending        grab_bag/getter/makefile.sol
Sending        grab_bag/harley2hinv/makefile.sol
Sending        grab_bag/pick_recorder/makefile.sol
Sending        grab_bag/putter/makefile.sol
Sending        grab_bag/trig2arc/makefile.sol
Sending        html/web_report/makefile.sol
Sending        libsrc/qlib2/qlib2.h
Sending        libsrc/qlib2/qlib2.inc
Sending        libsrc/solaris/makefile.sol
Sending        libsrc/unix/makefile.ux
Sending        libsrc/util/makefile.sol
Sending        libsrc/util/wfdiscputaway.c
Sending        reporting/copystatus/makefile.sol
Sending        reporting/diskmgr/makefile.sol
Sending        reporting/nq2gif/makefile.sol
Sending        reporting/snwclient/makefile.lnx
Sending        reporting/snwclient/makefile.sol
Sending        reporting/statmgr/makefile.sol
Sending        seismic_processing/binder_ew/makefile.sol
Sending        seismic_processing/carlstatrig/makefile.sol
Sending        seismic_processing/carlsubtrig/makefile.sol
Sending        seismic_processing/coda_aav/makefile.sol
Sending        seismic_processing/coda_aav/makefile.ux
Sending        seismic_processing/coda_dur/makefile.sol
Sending        seismic_processing/coda_dur/makefile.ux
Sending        seismic_processing/compress_UA/makefile.sol
Sending        seismic_processing/debias/makefile.lnx
Sending        seismic_processing/debias/makefile.sol
Sending        seismic_processing/decimate/makefile.lnx
Sending        seismic_processing/decimate/makefile.sol
Sending        seismic_processing/decompress_UA/makefile.sol
Sending        seismic_processing/eqassemble/makefile.sol
Sending        seismic_processing/eqbuf/makefile.sol
Sending        seismic_processing/eqcoda/makefile.sol
Sending        seismic_processing/eqfilter/makefile.sol
Sending        seismic_processing/eqfilterII/makefile.sol
Sending        seismic_processing/eqprelim/makefile.sol
Sending        seismic_processing/eqproc/makefile.sol
Sending        seismic_processing/eqverify/makefile.sol
Sending        seismic_processing/eqverify_assemble/makefile.sol
Sending        seismic_processing/eqverify_assemble/makefile.ux
Sending        seismic_processing/evansassoc/makefile.sol
Sending        seismic_processing/evanstrig/makefile.sol
Sending        seismic_processing/ew2rsam/makefile.sol
Sending        seismic_processing/ew2ssam/makefile.sol
Sending        seismic_processing/ew_rsamalarm/makefile.ux
Sending        seismic_processing/ewnotify/makefile.sol
Sending        seismic_processing/ewnotify/makefile.ux
Sending        seismic_processing/ewshear/makefile.ux
Sending        seismic_processing/ewthresh/makefile.ux
Sending        seismic_processing/fir/makefile.lnx
Sending        seismic_processing/fir/makefile.sol
Sending        seismic_processing/geqproc/makefile.sol
Sending        seismic_processing/globalproc/makefile.sol
Sending        seismic_processing/gmew/makefile.sol
Sending        seismic_processing/localmag/makefile.sol
Sending        seismic_processing/nll_mgr/makefile.ux
Sending        seismic_processing/nq2pgm/makefile.sol
Sending        seismic_processing/nq2pgm/makefile.ux
Sending        seismic_processing/pick_FP/makefile.ux
Sending        seismic_processing/pick_ew/makefile.sol
Sending        seismic_processing/pkfilter/makefile.sol
Sending        seismic_processing/rayloc_ew/makefile.linux
Sending        seismic_processing/rayloc_ew/makefile.sol_gcc
Sending        seismic_processing/raypicker/makefile.sol
Sending        seismic_processing/statrigfilter/makefile.sol
Sending        seismic_processing/wftimefilter/makefile.sol
Sending        seismic_processing/wftimeshifter/makefile.sol
Sending        system_control/pau/makefile.sol
Sending        system_control/reconfigure/makefile.sol
Sending        system_control/restart/makefile.sol
Sending        system_control/startstop_solaris/makefile.sol
Sending        system_control/status/makefile.sol
Sending        system_control/stopmodule/makefile.sol
Transmitting file data ...........................................................................................................................................................
Committed revision 5280.

comment:2 Changed 8 years ago by tim

$(cc) does not work on Solaris. All references to $(cc) have been replaced with $(CC). Including some existing NT makefiles.

This has been tested on Solaris, Linux and XP and all compiled.

Note: See TracTickets for help on using tickets.