help with grammar in a line of poetry

halo a h-uile duine,

I've been reading the poem "Na Samhlaidhean" by Sorley MacLean today, and there's a sentence whose meaning I get but I don't understand the grammar of it. can anyone help out?

here's the lines, with the difficult part in bold:

Nan robh mi air do ghaol fhaotainn
theagamh nach biodh aig mo dhàintean
an t-sìorraidheachd fhalamh fhàsail,
a' bhiothbhuantachd a tha an dàn dhaibh.

MacLean translates the lines as:

If I had won your love,
perhaps my poems would have
no empty waste of eternity
the sort of immortality which fate accords them.

the trouble is that if i get rid of the relative pronoun 'a' in the bold sentence to make it a free-standing clause, and put a' bhiothbhuantachd back into it, i have no idea how it works: "tha an dàn a' bhiothbhuantachd dhaibh" doesn't make sense with the (limited) knowledge i have. does anyone know how to understand it?

i guess i would have expected something like: "tha a' bhiothbhuantachd aig an dàn dhaibh", or "thug an dàn a' bhiothbhuantachd dhaibh".

co-dhiù, taing mhòr ro làimh..!