c++ – Modifying sources in gcc

Question:

I have a task to parse the operation of the omp.h library. I am working with gcc sources. As a test, I wanted to change the omp_get_thread_num() function so that it always returns a constant (256 in my case). After modifying the function in parallel.c , I did make and make install for the gcc sources and ran the test program. However, the omp_get_thread_num() function still produces a non-256 result. What is my mistake?

Answer:

I don’t know what the error is, but I’m writing in essence what exactly helped me: after replacing the OpenSuse 11.3 and OpenSuse 12.3 operating systems, on which I tried to work on Ubuntu 12.04 everything worked. That is, I successfully made changes to the gcc sources and they took effect. If anyone needs it: I used this instruction to build and install the compiler.

Scroll to Top