Wiring 2 prong outlet to 3 prong outlet
If the ground comes from the same service panel you can tap into that ground and it will be code compliant with the 2017 NEC , if it comes from a different source the code compliant method is to attach a sticker that comes with the GFCI , GFCI protected no equipment ground.