Short answer. From the free portion. Article 909 of the Civil Code provides that donations to strangers — people who are not compulsory heirs — are charged to the part of the estate the testator could have disposed of by will. They do not reduce the children's protected legitimes, unless the donation was so large it exceeded the free portion.
What the law says
Donations made to strangers shall be charged to that part of the estate of which the testator could have disposed by his last will. Insofar as they may be inofficious or may exceed the disposable portion, they shall be reduced according to the rules established by this Code.
Civil Code, Article 909 — Charging Donations To Shares. Read the full provision →
The rule for donations to strangers
Article 909 of the Civil Code draws a clear line between donations to children and donations to strangers. A friend, an unrelated neighbor, a charitable cause — anyone who is not a compulsory heir — falls into the "stranger" category. For these donees: "Donations made to strangers shall be charged to that part of the estate of which the testator could have disposed by his last will." This freely disposable portion — the part not reserved for compulsory heirs — is what a testator can give to anyone at all. The land your father gave his friend is charged to that same portion.
Your legitime is protected up to a point
Because donations to strangers come out of the free portion, they do not reduce what the children's legitimes would otherwise be — at least not directly. The children's reserved share is computed independently, based on the full notional estate. The donation to the friend is treated as having been paid out of the disposable portion, leaving the children's share theoretically intact. If the gift to the friend was modest and well within the free portion, the children's inherited shares are not affected.
When the donation exceeds the free portion
Article 909 adds an important caveat: donations to strangers that "may be inofficious or may exceed the disposable portion, they shall be reduced according to the rules established by this Code." An inofficious donation is one that, when the full estate is computed, turns out to be more than the testator was permitted to give away freely. If the land donated to the friend was worth so much that it ate into the reserve for the compulsory heirs, the excess is subject to reduction. The children may petition to have that portion of the donation reduced to restore what was improperly taken from their reserved shares.
The comparison with donations to children
Article 909 opens with the contrasting rule for children: "Donations given to children shall be charged to their legitime." So a gift from a parent to a child is treated as an advance on the child's own reserved share — it reduces what the child still collects from the estate but does not help or hurt the other children's shares directly. A gift to a stranger works differently: it comes from the pool that the parent could have left to anyone, and the compulsory heirs are only affected if that pool is exhausted. Understanding which rule applies to a particular donation is the starting point for computing everyone's shares correctly.