Skip to content

modules/core: fix x86 PIC code compilation#3331

Merged
opencv-pushbot merged 1 commit intoopencv:2.4from
tSed:opencv-2.4.x/fix-x86-PIC-compilation
Oct 12, 2014
Merged

modules/core: fix x86 PIC code compilation#3331
opencv-pushbot merged 1 commit intoopencv:2.4from
tSed:opencv-2.4.x/fix-x86-PIC-compilation

Conversation

@tSed
Copy link
Copy Markdown
Contributor

@tSed tSed commented Oct 12, 2014

This change fixes HW detection code on x86 when building PIC code.
In this case, "=b" cannot be used for output registers because ebx is used to store the GOT.

This bug is only on the 2.4 branch, and does not affect the master branch.

This bug was triggered by Buildroot autobuilders [1,2], causing this
kind of failures [3,4]:

  [ 14%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/system.cpp.o
  /home/test/autobuild/instance-0/output/build/opencv-2.4.10/modules/core/src/system.cpp: In function '(static initializers for /home/test/autobuild/instance-0/output/build/opencv-2.4.10/modules/core/src/system.cpp)':
  /home/test/autobuild/instance-0/output/build/opencv-2.4.10/modules/core/src/system.cpp:280:10: error: inconsistent operand constraints in an 'asm'
  make[3]: *** [modules/core/CMakeFiles/opencv_core.dir/src/system.cpp.o] Error 1

[1] http://buildroot.org/
[2] http://autobuild.buildroot.org/
[3] http://autobuild.buildroot.org/?reason=opencv-2.4.10
[4] http://autobuild.buildroot.org/results/483/4838285b25d6293a5cf0bb9eadd5040a7c75d766/build-end.log

Signed-off-by: Samuel Martin <[email protected]>
@vpisarev vpisarev self-assigned this Oct 12, 2014
@vpisarev
Copy link
Copy Markdown
Contributor

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants