It is important to distinguish between a) the total stock of building land, much of which may be already built upon, and b) that (usually small) part of the stock on which new building takes place in a particular period. A simple way to include building land within an aggregate production function for a period would be to focus on (b) as an input which, in conjunction with raw materials, physical capital and labour, is used in the period to produce new industrial or residential buildings. There is no obvious reason why such a production function should not be Cobb-Douglas (such a function would be consistent for example with a smaller area of land being offset by sufficiently large quantities of other inputs, building higher to obtain buildings of similar floor space and value). Aggregation of physical capital used in building with other forms of physical capital to obtain an overall quantity of capital raises complex issues, but this is a general difficulty with aggregate production functions and not specific to building.
If instead the focus is on the total stock of building land as an input to an aggregate production function, then some way must be found to identify and value the associated output where (as in most cases) buildings were constructed in an earlier period, often many years ago. That could be the rent, where a building has a tenant. For owner-occupied buildings, a value would need to be imputed for (in the case of residential buildings) the value of housing services for the period.
In GDP, common practice is to include housing in two ways: both new housing investment in the period and the value for the period of housing services (see here for a US source). While this is a perfectly reasonable approach to output measurement, it does suggest that if output in an aggregate production function is identified with GDP, then it will not be straightforward to treat building land as an input, since the quantity of land relevant to the housing investment is not that relevant to the housing services.
In answer to your query whether the granting of permission to build could be regarded as production, it is certainly true that this can enormously increase the market value of land. It is also true that obtaining permission may require a certain amount of effort and expense (eg professional fees) by the landowner in preparing a plan for development of the site which is acceptable to the planning authority. However, it would be stretching the meaning of the term to call this production. The increase in value of the land is properly described as a capital gain, not an addition to output, and as such does not form part of GDP.