Status: New
Owner:
liu...@google.com
Labels: Type-Defect Priority-Medium
New issue 507 by
j...@rawbw.com:
/usr/include/google/protobuf/stubs/platform_macros.h should check for
__powerpc__
http://code.google.com/p/protobuf/issues/detail?id=507
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
__ppc__:
$ ./powerpc-unknown-linux-gnu-g++ -dM -E - < /dev/null
[snip]
#define __powerpc 1
#define __powerpc__ 1
#define powerpc 1
#define __PPC 1
#define __PPC__ 1
#define PPC 1
[snip]
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.
None.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings