New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 728835 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Jun 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Fix glmark2 to work with clang.

Project Member Reported by manojgupta@chromium.org, Jun 1 2017

Issue description

Old issue:  https://crbug.com/497443 .

glmark2 waffle backend puts gl* function pointers in global scope which clang does not like with extern "C" functions in gl2.h header file.


void (*glActiveTexture) (int texture);

clang complains
a.cc:6:8: error: declaration of 'glActiveTexture' in global scope conflicts with declaration with C language linkage
void (*glActiveTexture) (int texture); 
       ^
a.cc:3:47: note: declared with C language linkage here
  __attribute__((visibility("default"))) void glActiveTexture (int texture);
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/fc5a45f4e9f8486e5ce8ffdb46148b58ccbbb642

commit fc5a45f4e9f8486e5ce8ffdb46148b58ccbbb642
Author: Manoj Gupta <manojgupta@google.com>
Date: Fri Jun 02 23:59:40 2017

Fix GLMark2 waffle backend patch to work with clang.

Waffle patch is declaring gl* function pointers in global scope.
clang complains because same functions with extern "C"
linkage are exported in gl2.h header file.
Put these function pointers in a separate namespace to fix this issue.

BUG= chromium:728835 
TEST=glmark2 builds for kevin and caroline boards.

Change-Id: I974fec8f25a7b000048de96645786c57343b9511
Reviewed-on: https://chromium-review.googlesource.com/521768
Commit-Ready: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Caroline Tice <cmtice@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/fc5a45f4e9f8486e5ce8ffdb46148b58ccbbb642/app-benchmarks/glmark2/files/0006-Add-waffle-backend.patch
[rename] https://crrev.com/fc5a45f4e9f8486e5ce8ffdb46148b58ccbbb642/app-benchmarks/glmark2/glmark2-285-r10.ebuild
[modify] https://crrev.com/fc5a45f4e9f8486e5ce8ffdb46148b58ccbbb642/chromeos/config/env/app-benchmarks/glmark2

Status: Verified (was: Untriaged)

Sign in to add a comment