Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #163060
| Path | csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Keith Thompson <Keith.S.Thompson+u@gmail.com> |
| Newsgroups | comp.lang.c |
| Subject | Re: Universal Build System for C |
| Date | Fri, 08 Oct 2021 20:51:28 -0700 |
| Organization | None to speak of |
| Lines | 50 |
| Message-ID | <87sfxa6ekf.fsf@nosuchdomain.example.com> (permalink) |
| References | <933b95c1-8c8c-48dc-ae58-d49806746b2fn@googlegroups.com> <sjktuo$p7l$1@dont-email.me> <32f93050-eff2-4960-b4c8-d3dd3075b31en@googlegroups.com> <4a46c648-4897-4b28-a3fc-242583460506n@googlegroups.com> <87h7ds7v8u.fsf@nosuchdomain.example.com> <18a56158-6c16-4c04-807e-74dfde2fd15an@googlegroups.com> <sjqfc5$63b$1@dont-email.me> <c18afb66-66dd-496b-b57a-3f09de87cdc7n@googlegroups.com> <2f5ffa4f-052d-45d8-a610-c36743ab1c22n@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain |
| Injection-Info | reader02.eternal-september.org; posting-host="7e8bdc203eb18db33af681d8600aa123"; logging-data="7106"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/LGqnY09DSJA2COqCZhXLa" |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
| Cancel-Lock | sha1:6ybddKlmPxhJ2JgyIlo3wRlkths= sha1:3szuDCeHroLl6UbISzevZtLWGOI= |
| Xref | csiph.com comp.lang.c:163060 |
Show key headers only | View raw
Thiago Adams <thiago.adams@gmail.com> writes:
> On Friday, October 8, 2021 at 7:30:24 PM UTC-3, Thiago Adams wrote:
> ...
>> For Linux it is using default but I guess it could auto select as well, or show
>> some options..
>
> This is what I found how to change default gcc (because build script has hardcoded gcc)
>
> "
> 1. Open the terminal window in LINUX and execute the command:
> $ which gcc
> This will provide the symbolic link (softlink) to the default version of GCC.
> 2. Navigate to the directory which has this softlink.
> Change the softlink to point to the version of GCC that you want to use.
> For example, for a standard GCC version 4.7 installed (where the compiler command is put at /usr/bin/gcc-4.7),
> this can be done using the following command:
> $ sudo ln -f -s /usr/bin/gcc-4.7 gcc
> "
> from
> https://www.mathworks.com/matlabcentral/answers/454659-how-can-i-change-my-current-gcc-g-version-to-a-supported-one
>
>
> also added
> system(""gcc --version") inside the build script to know
> what version is being used.
>
> this is an extra step , however I guess all linux programmers
> must know about this.
That's bad advice. Telling users to mess around with system-owned
directories like /usr/bin is dangerous. I know Linux pretty well, and I
don't do that myself.
On my system, for example, /usr/bin/gcc is a symbolic link to "gcc-9",
which is provided by the "gcc-9" package. That package provides 55
files; the compiler executable is just one of them. If I manually
change just the /usr/bin/gcc symlink, I'm likely to leave my system in
an inconsistent state.
And g++ (the C++ compiler) is provided by another package "g++9", which
should normally be kept in synch with the gcc package.
On Ubuntu, the "update-alternatives" command can be used to safely
change the default version of a command. Other systems are likely to
have something similar.
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Philips
void Void(void) { Void(); } /* The recursive call of the void */
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Universal Build System for C Thiago Adams <thiago.adams@gmail.com> - 2021-10-04 05:33 -0700
Re: Universal Build System for C Branimir Maksimovic <branimir.maksimovic@icloud.com> - 2021-10-04 15:54 +0000
Re: Universal Build System for C fir <profesor.fir@gmail.com> - 2021-10-04 09:26 -0700
Re: Universal Build System for C fir <profesor.fir@gmail.com> - 2021-10-04 09:47 -0700
Re: Universal Build System for C fir <profesor.fir@gmail.com> - 2021-10-04 10:13 -0700
Re: Universal Build System for C fir <profesor.fir@gmail.com> - 2021-10-05 04:12 -0700
Re: Universal Build System for C Guillaume <message@bottle.org> - 2021-10-04 19:49 +0200
Re: Universal Build System for C Thiago Adams <thiago.adams@gmail.com> - 2021-10-04 11:00 -0700
Re: Universal Build System for C Bart <bc@freeuk.com> - 2021-10-06 20:37 +0100
Re: Universal Build System for C Thiago Adams <thiago.adams@gmail.com> - 2021-10-07 06:18 -0700
Re: Universal Build System for C Thiago Adams <thiago.adams@gmail.com> - 2021-10-07 06:25 -0700
Re: Universal Build System for C Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-10-07 07:41 -0700
Re: Universal Build System for C Thiago Adams <thiago.adams@gmail.com> - 2021-10-08 14:05 -0700
Re: Universal Build System for C Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-10-08 14:22 -0700
Re: Universal Build System for C Thiago Adams <thiago.adams@gmail.com> - 2021-10-08 14:44 -0700
Re: Universal Build System for C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-10-08 23:25 +0100
Re: Universal Build System for C Thiago Adams <thiago.adams@gmail.com> - 2021-10-08 15:37 -0700
Re: Universal Build System for C Bart <bc@freeuk.com> - 2021-10-08 22:51 +0100
Re: Universal Build System for C Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2021-10-09 01:39 -0700
Re: Universal Build System for C Bart <bc@freeuk.com> - 2021-10-09 11:00 +0100
Re: Universal Build System for C scott@slp53.sl.home (Scott Lurndal) - 2021-10-10 18:09 +0000
8-bit ASCII (was Re: Universal Build System for C) scott@slp53.sl.home (Scott Lurndal) - 2021-10-10 20:55 +0000
Re: Universal Build System for C Bart <bc@freeuk.com> - 2021-10-08 23:05 +0100
Re: Universal Build System for C Thiago Adams <thiago.adams@gmail.com> - 2021-10-08 15:30 -0700
Re: Universal Build System for C Thiago Adams <thiago.adams@gmail.com> - 2021-10-08 18:12 -0700
Re: Universal Build System for C Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-10-08 20:51 -0700
Re: Universal Build System for C David Brown <david.brown@hesbynett.no> - 2021-10-09 12:54 +0200
Re: Universal Build System for C Thiago Adams <thiago.adams@gmail.com> - 2021-10-09 06:30 -0700
Re: Universal Build System for C David Brown <david.brown@hesbynett.no> - 2021-10-09 17:29 +0200
Re: Universal Build System for C Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2021-10-08 23:39 +0000
Re: Universal Build System for C Thiago Adams <thiago.adams@gmail.com> - 2021-10-08 17:50 -0700
Re: Universal Build System for C Thiago Adams <thiago.adams@gmail.com> - 2021-11-22 04:26 -0800
Re: Universal Build System for C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-11-22 20:39 +0000
Re: Universal Build System for C Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-11-22 13:18 -0800
Re: Universal Build System for C Bart <bc@freeuk.com> - 2021-11-22 21:49 +0000
Re: Universal Build System for C scott@slp53.sl.home (Scott Lurndal) - 2021-11-23 14:45 +0000
Re: Universal Build System for C Bart <bc@freeuk.com> - 2021-11-23 16:03 +0000
Re: Universal Build System for C Thiago Adams <thiago.adams@gmail.com> - 2022-04-18 14:39 -0700
Re: Universal Build System for C Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2022-04-18 22:17 +0000
Re: Universal Build System for C Thiago Adams <thiago.adams@gmail.com> - 2022-04-18 16:07 -0700
Re: Universal Build System for C scott@slp53.sl.home (Scott Lurndal) - 2021-11-23 14:44 +0000
Re: Universal Build System for C Thiago Adams <thiago.adams@gmail.com> - 2021-11-22 16:19 -0800
Re: Universal Build System for C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-11-23 01:00 +0000
csiph-web