[Bug c/53662] New: Cannot build static gcc on i686 linux gnu with -m64 support.

2012-06-13 Thread krejzi at email dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53662

 Bug #: 53662
   Summary: Cannot build static gcc on i686 linux gnu with -m64
support.
Classification: Unclassified
   Product: gcc
   Version: 4.6.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: kre...@email.com


Hello there. I am not sure if something is wrong with my setup, but I am unable
to build gcc multilib compiler.

I have pure 32bit system built from scratch (Linux From Scratch), but I would
like to have multilib compiler so I can compile 64bit kernel in 32bit userland
(not cross-compile).

Long story short, I am unable to bootstrap gcc to support -m64.

~/src/build/prev-gcc$ ./xgcc -v
Using built-in specs.
COLLECT_GCC=./xgcc
Target: i686-pc-linux-gnu
Configured with: ../src/configure --prefix=/usr/gcc --libdir=/usr/gcc/lib
--libexecdir=/usr/gcc/lib --without-headers --with-newlib --disable-shared
--disable-nls --disable-decimal-float --disable-libgomp --disable-libmudflap
--disable-libquadmath --disable-libssp --disable-threads --without-ppl
--without-cloog --enable-targets=i686-pc-linux-gnu,x86_64-unknown-linux-gnu
--with-mpfr-include=/home/armin/src/src/mpfr/src
--with-mpfr-lib=/home/armin/src/build/mpfr/.libs --enable-multilib
--with-multilib-list=m32,m64,mx32 --enable-bootstrap --enable-languages=c
Thread model: single
gcc version 4.6.3 (GCC) 

~/src/build/prev-gcc$ ./cc1 --help
...
  -m32[enabled]
  -m3dnow [disabled]
  -m64[disabled]
...

These are from stage2 and remain same after stage3, even when installed. It
just says "Sorry, 64bit mode not implemented" or whatever when I try to compile
something with gcc -m64.

I have built binutils with --enable-multilib support already, so I am not
really sure what I've done wrong. Shared gcc libraries require 64bit glibc and
since I don't have multilib compiler, I can't compile it ... So I am in catch22
situation. It looks like you need multilib compiler to compile multilib
compiler.

Also, I have tried without --with-multilib-lists, without --enable-targets, it
was same. Just when I used --enable-targets=all, it failed saying that 64bit
mode is unimplemeted after stage1 xgcc has been built.

Also, I have tried with system gmp, mpfr and mpc libraries which are same
versions as ones that are in gcc source tree (source dirs renamed into mpfr,
gmp and mpc respectively).

This is configure output from stage1 libgcc when using --enable-targets=all

checking whether ln -s works... yes
checking for i686-pc-linux-gnu-gcc... /home/armin/src/build/./gcc/xgcc
-B/home/armin/src/build/./gcc/ -B/usr/gcc/i686-pc-linux-gnu/bin/
-B/usr/gcc/i686-pc-linux-gnu/lib/ -isystem /usr/gcc/i686-pc-linux-gnu/include
-isystem /usr/gcc/i686-pc-linux-gnu/sys-include  -m64
checking for suffix of object files... configure: error: in
`/home/armin/src/build/i686-pc-linux-gnu/64/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.

and config.log says this:

Assembler messages:
Fatal error: no compiled in support for x86_64
configure:3058: $? = 1

So, is this really a problem in gcc bootstrap or my setup? And how else I am
able to build multilib compiler just from pure 32bit system? There must be a
way right?


[Bug c/53662] Cannot build static gcc on i686 linux gnu with -m64 support.

2012-06-13 Thread krejzi at email dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53662

--- Comment #2 from Armin K.  2012-06-13 21:17:35 UTC 
---
(In reply to comment #1)
> 
> That means you need a 64-bit capable binutils.
> 
> Just a guess, but you might need to use --target=x86_64-unknown-linux-gnu to
> make a cross compiler for x86_64, which will be multilib-capable by default. 
> To do that you'll need a 64-bit binutils and 64-bit glibc.
> 
> This should really be dealt with on the gcc-help mailing list, I don't think
> it's a bug.

Sorry, I meant that this might be bug in gcc bootstrap stage. As I said, I have
compiled binutils with --enable-multilib ... I could try --enable-64-bit-bfd
tough. Also, what is gcc-help mailing list address?


[Bug c++/80655] New: -Werror=format-truncation inconsistency between x86_32 and x86_64

2017-05-06 Thread krejzi at email dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80655

Bug ID: 80655
   Summary: -Werror=format-truncation inconsistency between x86_32
and x86_64
   Product: gcc
   Version: 7.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: krejzi at email dot com
  Target Milestone: ---

When building SPIRV-Tools with gcc-7.1.0 (stock, self-built), it builds fine
for 64 bit, but not for 32 bit (multilib setup).

The part of the code in question can be seen at [1]. I am getting the following
error when building SPIRV-Tools with "gcc -m32" and "g++ -m32"

In file included from
/home/armin/src/pacman/pkgbuild/vulkan-loader/src/Vulkan-LoaderAndValidationLayers32-sdk-1.0.46.0/external/spirv-tools/source/opt/ir_loader.cpp:17:0:
/home/armin/src/pacman/pkgbuild/vulkan-loader/src/Vulkan-LoaderAndValidationLayers32-sdk-1.0.46.0/external/spirv-tools/source/opt/log.h:
In function ‘void spvtools::Logf(const MessageConsumer&, spv_message_level_t,
const char*, const spv_position_t&, const char*, Args&& ...) [with Args =
{const SpvOp_&}]’:
/home/armin/src/pacman/pkgbuild/vulkan-loader/src/Vulkan-LoaderAndValidationLayers32-sdk-1.0.46.0/external/spirv-tools/source/opt/log.h:113:13:
error: null destination pointer [-Werror=format-truncation=]
 snprintf(longer_message.data(), longer_message.size(), format,
 ^~
  std::forward(args)...);
  

The very same package built fine with gcc-6.3.0.

[1]
https://github.com/KhronosGroup/SPIRV-Tools/blob/87a3f651e2416c830cb1eab410b3616068395985/source/opt/log.h#L111

[Bug c++/80655] -Werror=format-truncation inconsistency between x86_32 and x86_64

2017-05-06 Thread krejzi at email dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80655

--- Comment #2 from Armin K.  ---
Created attachment 41333
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41333&action=edit
Preprocessed source files

Here are the requested files. I apologize for having to compress them, but a
single file exceeded bugzilla file size limit (1.1 MB).

[Bug c++/80655] -Werror=format-truncation inconsistency between x86_32 and x86_64

2017-05-06 Thread krejzi at email dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80655

--- Comment #4 from Armin K.  ---
There is a log file in the tarball with all the options. Package is built with
cmake, so there's lot of them.

[Bug preprocessor/65713] C Preprocessor generates invalid output

2015-04-09 Thread krejzi at email dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65713

--- Comment #1 from Armin K.  ---
Created attachment 35275
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35275&action=edit
gcc 5.0.0 snapshot output


[Bug preprocessor/65713] C Preprocessor generates invalid output

2015-04-09 Thread krejzi at email dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65713

--- Comment #2 from Armin K.  ---
Created attachment 35276
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35276&action=edit
File used to produce the first two files

Two files are generated with gcc -E _mkerrcodes.h


[Bug preprocessor/65713] New: C Preprocessor generates invalid output

2015-04-09 Thread krejzi at email dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65713

Bug ID: 65713
   Summary: C Preprocessor generates invalid output
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: blocker
  Priority: P3
 Component: preprocessor
  Assignee: unassigned at gcc dot gnu.org
  Reporter: krejzi at email dot com

Created attachment 35274
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35274&action=edit
gcc-4.9.2 output

Using GCC snapshot 5.0.0 20150405 (experimental) and trying to build
libgpg-error-1.18, which generates a header file using the output from gcc -E
on a header file. Output from gcc-4.9.2 and the mentioned snapshot is
different, which causes libgpg-error to fail to compile.

gcc-4.9.2 gives the output from first.txt
mentioned snapshot gives the output from second.txt

The header file used in both examples is the third attachment.


[Bug preprocessor/65713] C Preprocessor generates invalid output

2015-04-09 Thread krejzi at email dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65713

--- Comment #4 from Armin K.  ---
Yes, that works. I'll take it to libgpg-error upstream. Thanks for the quick
response and please close this bug.