Labels: Type-Defect Priority-Medium
New issue 507 by j...@rawbw.com:
/usr/include/google/protobuf/stubs/platform_macros.h should check for
What steps will reproduce the problem?
1. Compile a generated foo.pb.cc file using GCC targeting the PowerPC ISA.
In my case, I am using a GCC 4.7 cross-compiler built using crosstool-ng.
2. Observe compiler error from
/usr/include/google/protobuf/stubs/platform_macros.h line 61:
"Host architecture was not detected as supported by protobuf"
3. The following command line shows several predefined macros, but not
$ ./powerpc-unknown-linux-gnu-g++ -dM -E - < /dev/null
#define __powerpc 1
#define __powerpc__ 1
#define powerpc 1
#define __PPC 1
#define __PPC__ 1
#define PPC 1
What is the expected output? What do you see instead?
The correct behavior is for platform_macros.h to detect the PowerPC
platform on line 57. The following works for me:
#elif defined(__ppc__) || defined(__powerpc__)
What version of the product are you using? On what operating system?
* Google protobuf 2.5.0.
* $ uname -a
Linux radix-mint14 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC
2012 x86_64 x86_64 x86_64 GNU/Linux
Please provide any additional information below.
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
You received this message because you are subscribed to the Google Groups "Protocol
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to email@example.com.
Visit this group at http://groups.google.com/group/protobuf?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.