Try passing -Wl,-pie to LDFLAGS instead of -pie