Joey,
This patch will do what you intend it to do. However, I am not sure in part related to VxWorks. The logic behind this patch is that -mno-pic-data-is-text-relative should enable -msingle-pic-base because otherwise it will be useless. The logic itself is orthogonal to OS. So I am not convinced the 'else if' shouldn't be just 'if'. It should not change VxWorks behaviour if VxWorks enables -msingle-pic-base explicitly. Or otherwise there is at least one use case that -mno-pic-data-is-text-relative can be used without -msingle-pic-base, which breaks the logic that this whole patch stands on.
VxWorks has two modes of code generation -- kernel and RTP. RTPs don't have a fixed mapping between code and data (and use special sequence to initialize the PIC register, using vxworks-specific relocs). Kernel mode doesn't support PIC code generation -- see config/vxworks.c
So I don't think there's a problem. nathan