also flag-pole, 1782, from flag (n.1) + pole (n.1). Flagpole-sitting as a craze is attested from 1927.
Entries linking to flagpole
flag n.1
"cloth ensign," late 15c., now in all modern Germanic languages (German Flagge, Dutch vlag, Danish flag, Swedish flagg, etc.) but apparently first recorded in English, of unknown origin, but likely connected to flag (v.1) or else an independent imitative formation "expressing the notion of something flapping in the wind" [OED]. A guess considered less likely is that it is from flag (n.2) on the notion of being square and flat.
Meaning "name and editorial information on a newspaper" is by 1956. U.S. Flag Day (1894) is in reference to the adopting of the Stars and Stripes by the Continental Congress on June 14, 1777.
pole n.1
"stake, staff," late Old English pal "stake, pole, post," a general Germanic borrowing (Old Frisian and Old Saxon pal "stake," Middle Dutch pael, Dutch paal, Old High German pfal, Old Norse pall) from Latin palus "a stake," from PIE *pakslo-, suffixed form of root *pag- "to fasten." Later specifically "a long, slender, tapering piece of wood."
Racing sense of "inside pole-fence surrounding a course" is from 1851; hence pole position in auto racing (1904). A ten-foot pole as a metaphoric measure of something one would not touch something (or someone) else with is by 1839, American English. The ten-foot pole was a common tool used to set stakes for fences, etc., and the phrase "Can't touch de bottom with a ten foot pole" is in the popular old minstrel show song "Camptown Races."
"I saw her eat."
"No very unnatural occurrence I should think."
"But she ate an onion!"
"Right my boy, right, never marry a woman who would touch an onion with a ten foot pole."
[The Collegian, University of Virginia, June 1839]