Discussion:
about gcc vendor string
hitmoon
2014-06-23 05:24:31 UTC
Permalink
Hi, everyone there:

I need to build gcc with a different vendor string, eg.
x86_64-vendor-linux. Now i have a gcc as x86_64-redhat-linux, how can I
do that?
As far as i know, in the native build case, the new gcc will be
'x86_64-redhat-linux'. If I specify --target=x86_64-vendor-linux, the
build will become a cross build. It seems that I am building a cross
compiler, which is not the case. Since the only difference is the
'vendor' part.
Is there a guide about how to build gcc with different vendor
string in native build way?
Marc Glisse
2014-06-23 05:53:54 UTC
Permalink
Post by hitmoon
I need to build gcc with a different vendor string, eg.
x86_64-vendor-linux. Now i have a gcc as x86_64-redhat-linux, how can I do
that?
As far as i know, in the native build case, the new gcc will be
'x86_64-redhat-linux'. If I specify --target=x86_64-vendor-linux, the build
will become a cross build. It seems that I am building a cross compiler,
which is not the case. Since the only difference is the 'vendor' part.
Is there a guide about how to build gcc with different vendor string in
native build way?
Did you try specifying --build instead of --target?
--
Marc Glisse
hitmoon
2014-06-23 06:08:05 UTC
Permalink
Post by Marc Glisse
Post by hitmoon
I need to build gcc with a different vendor string, eg.
x86_64-vendor-linux. Now i have a gcc as x86_64-redhat-linux, how can
I do that?
As far as i know, in the native build case, the new gcc will be
'x86_64-redhat-linux'. If I specify --target=x86_64-vendor-linux, the
build will become a cross build. It seems that I am building a cross
compiler, which is not the case. Since the only difference is the
'vendor' part.
Is there a guide about how to build gcc with different vendor string
in native build way?
Did you try specifying --build instead of --target?
Yes, I have specified --build, --host and --target, where --host euqals
--target. But, it seems that some environment variables, such as LD, AS,
AS_FOR_TARGET, LD_FOR_TARGET are also need to be override. This time,
build goes much more further, but faild with:

../../../../gcc-4.6.2-20111027/libgcc/../gcc/libgcc2.c:1809: warning:
implicit declaration of function ‘__builtin_huge_valq’
../../../../gcc-4.6.2-20111027/libgcc/../gcc/libgcc2.c:1809: error: size
of array ‘compile_type_assert’ is negative

In normal build, this error can not happen. So, it seems there is also
something more to do .
Jonathan Wakely
2014-06-23 08:10:22 UTC
Permalink
Post by hitmoon
Post by Marc Glisse
Did you try specifying --build instead of --target?
Yes, I have specified --build, --host and --target, where --host euqals
--target.
That's not what Marc asked.

Have you tried --build=x86_64-vendor-linux without any --host or
--target options?
hitmoon
2014-06-23 08:36:24 UTC
Permalink
Post by Jonathan Wakely
Post by hitmoon
Post by Marc Glisse
Did you try specifying --build instead of --target?
Yes, I have specified --build, --host and --target, where --host euqals
--target.
That's not what Marc asked.
Have you tried --build=x86_64-vendor-linux without any --host or
--target options?
sorry, I have not. I will soon.
hitmoon
2014-06-23 08:54:51 UTC
Permalink
Post by Jonathan Wakely
Post by hitmoon
Post by Marc Glisse
Did you try specifying --build instead of --target?
Yes, I have specified --build, --host and --target, where --host euqals
--target.
That's not what Marc asked.
Have you tried --build=x86_64-vendor-linux without any --host or
--target options?
Yes. It works! Marc is right!
When specify --build=x86_64-myvendor-linux, the build success!
My previous statement is wrong: in native build, when --build is not
specified, the result is 'x86_64-unknow-linux'.
Thank you guys very much!!

Loading...