There is no requirement that the compiler has to be open sourced.
Only the build scripts like Makefiles, CMakeLists.txt, Maven POM have to be open sourced.
If the compiler is not open source, somebody could take the GPL-ed source code and port it to be built using another compiler which is open source.
The “System Libraries” of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
“Major Component”, in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The “Corresponding Source” for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The GPL FAQ also states that "which programs you used to ... compile it ... usually makes no difference for issues concerning the licensing of that source code".
Can I release a program under the GPL which I developed using nonfree
Which programs you used to edit the source code, or to compile it, or
study it, or record it, usually makes no difference for issues
concerning the licensing of that source code.
However, if you link nonfree libraries with the source code, that
would be an issue you need to deal with. It does not preclude
releasing the source code under the GPL, but if the libraries don't
fit under the “system library” exception, you should affix an explicit
notice giving permission to link your program with them. The FAQ entry
about using GPL-incompatible libraries provides more information about
how to do that.