doom legacy uses -fwritable-strings that was removed from gcc-4 thus compilation is only possible with gcc-3 (with lots of warnings: "cc1: note: -fwritable-strings is deprecated; see documentation for details") Suggestion: strip this useles flag away
*** This bug has been marked as a duplicate of 147082 ***