Assuming Doom Legacy is only under the GPL, you could make commercial games with it, however you'd still have to release the source code. ZDoom, on the other hand, contains code from the Build engine and FMOD and is overall a mess in terms of licensing.