ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Evgeny Sinelnikov <sin@altlinux.ru>
To: gcc@packages.altlinux.org
Cc: ALT Devel discussion list <devel@altlinux.ru>
Subject: Fwd: Re: [devel] GCC_VERSION
Date: Sat, 11 Sep 2004 21:58:51 +0400
Message-ID: <200409112158.51368.sin@altlinux.ru> (raw)

[-- Attachment #1: Type: text/plain, Size: 1372 bytes --]

Здравствуйте,

после некоторого анализа, нашел решение для нижеприведенного.
* Sat Sep 11 2004 Evgeny Sinelnikov <sin@altlinux.ru> 1.4.4-alt1
- Changed gcc_wrapper to canonical 4-digit form compatibility.

Пересобрал gcc-common со вторым из патчей.

----------  Пересланное сообщение  ----------

Subject: Re: [devel] GCC_VERSION
Date: 11 Сентябрь 2004 15:08
From: Evgeny Sinelnikov <sin@altlinux.ru>
To: ALT Devel discussion list <devel@altlinux.ru>

В сообщении от 11 Сентябрь 2004 03:06 Evgeny Sinelnikov написал(a):
> В сообщении от 10 Сентябрь 2004 12:43 Evgeny Sinelnikov написал(a):
> > Привет всем!
> > Во время сборки rtai наткнулся на такую ошибку:
> > /usr/bin/i586-alt-linux-gcc-0303: No such file or directory
> >
> > Не ясно где и как производится подстяновка gcc. Куда копать?
>
> Так всё нашел: gcc_wrapper.c:
> буду разбираться, откуда выходит будто GCC_VERSION=0303...

Так я разобрался, вроде, где причина - конфликт имён.
/usr/src/linux-2.6.8.1-rt26-up/arch/i386/Makefile:
...
GCC_VERSION := $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh
$(CC))
...

Странно, почему оно во время сборки ядра не мешает?

Sin
_______________________________________________
Devel mailing list
Devel@altlinux.ru
https://lists.altlinux.ru/mailman/listinfo/devel

-------------------------------------------------------

[-- Attachment #2: gcc_wrapper.c-2.patch --]
[-- Type: text/x-diff, Size: 1032 bytes --]

--- gcc_wrapper.c.orig	2004-03-07 03:22:40 +0300
+++ gcc_wrapper.c	2004-09-11 21:10:09 +0400
@@ -15,6 +15,7 @@
 	const char *call_name = __progname;
 	const char *version = getenv ("GCC_VERSION");
 	const char *use_ccache = getenv ("GCC_USE_CCACHE");
+	int major, minor;
 
 	if (!strcmp (__progname, "gcc_wrapper"))
 		error (EXIT_FAILURE, 0, "try gcc instead");
@@ -37,8 +38,19 @@
 
 	if (version && *version)
 	{
-		if (asprintf (&suffix, "-%s", version) < 0)
-			error (EXIT_FAILURE, errno, "asprintf");
+		if (sscanf (version, "%d.%d", &major, &minor) == 2)
+		{
+			if (asprintf (&suffix, "-%d.%d", major, minor) < 0)
+				error (EXIT_FAILURE, errno, "asprintf");
+		} else
+		if (sscanf (version, "%2d%2d", &major, &minor) == 2)
+		{
+			if (asprintf (&suffix, "-%d.%d", major, minor) < 0)
+				error (EXIT_FAILURE, errno, "asprintf");
+		} else {
+			if (asprintf (&suffix, "-%s", version) < 0)
+				error (EXIT_FAILURE, errno, "asprintf");
+		}
 	}
 
 	if (asprintf (&target_name, "%s-%s%s", TARGET, call_name, suffix) < 0)

[-- Attachment #3: gcc_wrapper.c-1.patch --]
[-- Type: text/x-diff, Size: 1024 bytes --]

--- gcc_wrapper.c.orig	2004-03-07 03:22:40 +0300
+++ gcc_wrapper.c	2004-09-11 20:46:43 +0400
@@ -15,6 +15,7 @@
 	const char *call_name = __progname;
 	const char *version = getenv ("GCC_VERSION");
 	const char *use_ccache = getenv ("GCC_USE_CCACHE");
+	int major, minor;
 
 	if (!strcmp (__progname, "gcc_wrapper"))
 		error (EXIT_FAILURE, 0, "try gcc instead");
@@ -37,8 +38,19 @@
 
 	if (version && *version)
 	{
-		if (asprintf (&suffix, "-%s", version) < 0)
-			error (EXIT_FAILURE, errno, "asprintf");
+		if (sscanf (version, "%d.%d", &major, &minor) == 2)
+		{
+			if (asprintf (&suffix, "-%s", version) < 0)
+				error (EXIT_FAILURE, errno, "asprintf");
+		} else
+		if (sscanf (version, "%2d%2d", &major, &minor) == 2)
+		{
+			if (asprintf (&suffix, "-%d.%d", major, minor) < 0)
+				error (EXIT_FAILURE, errno, "asprintf");
+		} else {
+			if (asprintf (&suffix, "-%s", version) < 0)
+				error (EXIT_FAILURE, errno, "asprintf");
+		}
 	}
 
 	if (asprintf (&target_name, "%s-%s%s", TARGET, call_name, suffix) < 0)

                 reply	other threads:[~2004-09-11 17:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200409112158.51368.sin@altlinux.ru \
    --to=sin@altlinux.ru \
    --cc=devel@altlinux.ru \
    --cc=gcc@packages.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git